badgerdb

package
v0.6.6 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2021 License: Apache-2.0 Imports: 6 Imported by: 0 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

This section is empty.

Types

type BadgerDB

type BadgerDB struct {
	// contains filtered or unexported fields
}

func NewDB

func NewDB(dbName, dir string) (*BadgerDB, error)

NewDB creates a Badger key-value store backed to the directory dir supplied. If dir does not exist, it will be created.

func NewDBWithOptions

func NewDBWithOptions(opts badger.Options) (*BadgerDB, error)

NewDBWithOptions creates a BadgerDB key value store gives the flexibility of initializing a database with the respective options.

func (*BadgerDB) Close

func (b *BadgerDB) Close() error

func (*BadgerDB) Delete

func (b *BadgerDB) Delete(key []byte) error

func (*BadgerDB) DeleteSync

func (b *BadgerDB) DeleteSync(key []byte) error

func (*BadgerDB) Get

func (b *BadgerDB) Get(key []byte) ([]byte, error)

func (*BadgerDB) Has

func (b *BadgerDB) Has(key []byte) (bool, error)

func (*BadgerDB) Iterator

func (b *BadgerDB) Iterator(start, end []byte) (tmdb.Iterator, error)

func (*BadgerDB) NewBatch

func (b *BadgerDB) NewBatch() tmdb.Batch

func (*BadgerDB) Print

func (b *BadgerDB) Print() error

func (*BadgerDB) ReverseIterator

func (b *BadgerDB) ReverseIterator(start, end []byte) (tmdb.Iterator, error)

func (*BadgerDB) Set

func (b *BadgerDB) Set(key, value []byte) error

func (*BadgerDB) SetSync

func (b *BadgerDB) SetSync(key, value []byte) error

func (*BadgerDB) Stats

func (b *BadgerDB) Stats() map[string]string

Jump to

Keyboard shortcuts

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