Versions in this module Expand all Collapse all v0 v0.1.0 Mar 12, 2018 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() + Delete func(key []byte) error + Get func(key []byte) ([]byte, error) + Has func(key []byte) (bool, error) + NewBatch func() Batch + func NewTable(db Database, prefix string) Database + 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) Path() string + func (db *LDBDatabase) Put(key []byte, value []byte) error + type MemDatabase struct + func NewMemDatabase() (*MemDatabase, error) + func NewMemDatabaseWithCap(size int) (*MemDatabase, error) + 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