badger_adaptor

package
v0.0.0-...-bfb0b02 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: MIT Imports: 5 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustCreateOrOpenBadgerDB

func MustCreateOrOpenBadgerDB(dir string, opt ...badger.Options) *badger.DB

MustCreateOrOpenBadgerDB opens existing DB or creates new empty

func OpenBadgerDB

func OpenBadgerDB(dir string, opt ...badger.Options) (*badger.DB, error)

OpenBadgerDB opens existing Badger DB

Types

type DB

type DB struct {
	*badger.DB
}

func New

func New(db *badger.DB) *DB

func (*DB) BatchedWriter

func (a *DB) BatchedWriter() common.KVBatchedWriter

func (*DB) Get

func (a *DB) Get(key []byte) []byte

func (*DB) Has

func (a *DB) Has(key []byte) bool

func (*DB) Iterator

func (a *DB) Iterator(prefix []byte) common.KVIterator

func (*DB) Set

func (a *DB) Set(key, value []byte)

Jump to

Keyboard shortcuts

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