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

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