Versions in this module Expand all Collapse all v1 v1.1.3 Feb 13, 2020 Changes in this version + const IdealBatchSize + var OpenFileLimit = 64 + type Batch interface + Reset func() + ValueSize func() int + Write func() error + func NewTableBatch(db Database, prefix string) Batch + type Database interface + Close func() + Get func(key []byte) ([]byte, error) + Has func(key []byte) (bool, error) + NewBatch func() Batch + func NewTable(db Database, prefix string) Database + type Deleter interface + Delete func(key []byte) error + type LDBDatabase struct + func NewLDBDatabase(file string, cache int, handles int) (*LDBDatabase, error) + func (db *LDBDatabase) Close() + func (db *LDBDatabase) Delete(key []byte) error + func (db *LDBDatabase) Get(key []byte) ([]byte, error) + func (db *LDBDatabase) Has(key []byte) (bool, error) + func (db *LDBDatabase) LDB() *leveldb.DB + func (db *LDBDatabase) Meter(prefix string) + func (db *LDBDatabase) NewBatch() Batch + func (db *LDBDatabase) NewIterator() iterator.Iterator + func (db *LDBDatabase) NewIteratorWithPrefix(prefix []byte) iterator.Iterator + func (db *LDBDatabase) Path() string + func (db *LDBDatabase) Put(key []byte, value []byte) error + type MemDatabase struct + func NewMemDatabase() *MemDatabase + func NewMemDatabaseWithCap(size int) *MemDatabase + func (db *MemDatabase) Close() + func (db *MemDatabase) Delete(key []byte) error + func (db *MemDatabase) Get(key []byte) ([]byte, error) + func (db *MemDatabase) Has(key []byte) (bool, error) + func (db *MemDatabase) Keys() [][]byte + func (db *MemDatabase) Len() int + func (db *MemDatabase) NewBatch() Batch + func (db *MemDatabase) Put(key []byte, value []byte) error + type Putter interface + Put func(key []byte, value []byte) error