embed

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: MIT Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 records in BadgerDB

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 BadgerDB

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) error

InitDB initializes the Badger database

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 BadgerDB

func Update

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

Update records in BadgerDB

func Upsert

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

Upsert records into BadgerDB

Types

This section is empty.

Jump to

Keyboard shortcuts

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