embed

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Count

func Count(dbname, collname string, spec map[string]any) int

Count gets number of records from document-oriented db

func Distinct

func Distinct(dbname, collname, field string) ([]any, error)

Distinct gets number records from document-oriented db

func Get

func Get(dbname, collname string, spec map[string]any, idx, limit int) []map[string]any

Get records from document-oriented db

func GetSorted

func GetSorted(dbname, collname string, spec map[string]any, skeys []string, sortOrder, idx, limit int) []map[string]any

GetSorted fetches records from document-oriented db sorted by given key with specific order

func InitDB

func InitDB(dbDir string)

InitDB initializes document-oriented db connection object

func Insert added in v0.5.3

func Insert(dbname, collname string, records []map[string]any)

Insert records into document-oriented db

func InsertRecord

func InsertRecord(dbname, collname string, rec map[string]any) error

InsertRecord insert record with given spec to document-oriented db

func Remove

func Remove(dbname, collname string, spec map[string]any) error

Remove records from document-oriented db

func Update

func Update(dbname, collname string, spec, newdata map[string]any)

Update inplace for given spec

func Upsert

func Upsert(dbname, collname, attr string, records []map[string]any) error

Upsert records into document-oriented db

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL