bunt

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NewSession = func(path string) (ISession, error) {
	return buntdb.Open(path)
}

NewSession method

Functions

This section is empty.

Types

type ISession

type ISession interface {
	Close() error
	Save(wr io.Writer) error
	Load(rd io.Reader) error
	CreateIndex(name, pattern string, less ...func(a, b string) bool) error
	ReplaceIndex(name, pattern string, less ...func(a, b string) bool) error
	CreateSpatialIndex(name, pattern string, rect func(item string) (min, max []float64)) error
	ReplaceSpatialIndex(name, pattern string, rect func(item string) (min, max []float64)) error
	DropIndex(name string) error
	Indexes() ([]string, error)
	ReadConfig(config *buntdb.Config) error
	SetConfig(config buntdb.Config) error
	Shrink() error
	View(fn func(tx *buntdb.Tx) error) error
	Update(fn func(tx *buntdb.Tx) error) error
	Begin(writable bool) (*buntdb.Tx, error)
}

ISession interface

func NewExtendBuntDatabase

func NewExtendBuntDatabase(logger *zap.Logger) (ISession, func(), error)

Jump to

Keyboard shortcuts

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