Versions in this module Expand all Collapse all v1 v1.0.1 Mar 1, 2020 Changes in this version + const IdealBatchSize + var OpenFileLimit = 64 — darwin/amd64, linux/amd64, windows/amd64 + func MakeKey(prefix string, key interface{}) ([]byte, error) + 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 + type StorageContractDB struct + DB Database + func (scdb *StorageContractDB) DeleteWithPrefix(key interface{}, prefix string) error + func (scdb *StorageContractDB) GetWithPrefix(key interface{}, prefix string) ([]byte, error) + func (scdb *StorageContractDB) StoreWithPrefix(key interface{}, value []byte, prefix string) error