Versions in this module Expand all Collapse all v0 v0.6.6 Aug 20, 2021 Changes in this version + var ErrBatchClosed = errors.New("batch has been written or closed") + var ErrKeyEmpty = errors.New("key cannot be empty") + var ErrValueNil = errors.New("value cannot be nil") + func FileExists(filePath string) bool + func IsKeyInDomain(key, start, end []byte) bool + type Batch interface + Close func() error + Delete func(key []byte) error + Set func(key, value []byte) error + Write func() error + WriteSync func() error + type DB interface + Close func() error + Delete func([]byte) error + DeleteSync func([]byte) error + Get func([]byte) ([]byte, error) + Has func(key []byte) (bool, error) + Iterator func(start, end []byte) (Iterator, error) + NewBatch func() Batch + Print func() error + ReverseIterator func(start, end []byte) (Iterator, error) + Set func([]byte, []byte) error + SetSync func([]byte, []byte) error + Stats func() map[string]string + type Iterator interface + Close func() error + Domain func() (start []byte, end []byte) + Error func() error + Key func() (key []byte) + Next func() + Valid func() bool + Value func() (value []byte) + func IteratePrefix(db DB, prefix []byte) (Iterator, error) + type PrefixDB struct + func NewPrefixDB(db DB, prefix []byte) *PrefixDB + func (pdb *PrefixDB) Close() error + func (pdb *PrefixDB) Delete(key []byte) error + func (pdb *PrefixDB) DeleteSync(key []byte) error + func (pdb *PrefixDB) Get(key []byte) ([]byte, error) + func (pdb *PrefixDB) Has(key []byte) (bool, error) + func (pdb *PrefixDB) Iterator(start, end []byte) (Iterator, error) + func (pdb *PrefixDB) NewBatch() Batch + func (pdb *PrefixDB) Print() error + func (pdb *PrefixDB) ReverseIterator(start, end []byte) (Iterator, error) + func (pdb *PrefixDB) Set(key []byte, value []byte) error + func (pdb *PrefixDB) SetSync(key []byte, value []byte) error + func (pdb *PrefixDB) Stats() map[string]string