Documentation ¶
Index ¶
- type Batch
- type CRocksDB
- func (db *CRocksDB) Close()
- func (db CRocksDB) ColumnFamilyHandles() gorocksdb.ColumnFamilyHandles
- func (db CRocksDB) GetDataFromColumnFamily(index int, key []byte) (*gorocksdb.Slice, error)
- func (db CRocksDB) Iterator(start, end []byte) Iterator
- func (db CRocksDB) IteratorColumnFamily(start, end []byte, cf *gorocksdb.ColumnFamilyHandle) Iterator
- func (db CRocksDB) NewBatch() Batch
- func (db *CRocksDB) SetDataInColumnFamily(index int, key, value []byte) error
- type DB
- type Iterator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Batch ¶
type Batch interface { SetColumnFamily(cf *gorocksdb.ColumnFamilyHandle, key, value []byte) Write() (int, error) }
type CRocksDB ¶
type CRocksDB struct {
// contains filtered or unexported fields
}
func NewCRocksDB ¶
func (CRocksDB) ColumnFamilyHandles ¶
func (db CRocksDB) ColumnFamilyHandles() gorocksdb.ColumnFamilyHandles
Implements DB.
func (CRocksDB) GetDataFromColumnFamily ¶
Implements DB.
func (CRocksDB) IteratorColumnFamily ¶
func (db CRocksDB) IteratorColumnFamily(start, end []byte, cf *gorocksdb.ColumnFamilyHandle) Iterator
Implements DB.
type DB ¶
type DB interface { // Get value from specific ColumnFamily GetDataFromColumnFamily(index int, key []byte) (*gorocksdb.Slice, error) // Set value In specific ColumnFamily SetDataInColumnFamily(index int, key, value []byte) error // Specific Column Family Iterator IteratorColumnFamily(start, end []byte, cf *gorocksdb.ColumnFamilyHandle) Iterator // Creates a batch for atomic updates. NewBatch() Batch // Get all ColumnFamily handles which return slice of *columnFamilyHandle ColumnFamilyHandles() gorocksdb.ColumnFamilyHandles // Iterate over a domain of keys in ascending order. End is exclusive. // Start must be less than end, or the Iterator is invalid. // A nil start is interpreted as an empty byteslice. // If end is nil, iterates up to the last item (inclusive). // CONTRACT: No writes may happen within a domain while an iterator exists over it. // CONTRACT: start, end readonly []byte Iterator(start, end []byte) Iterator // Closes the connection. Close() }
DBs are goroutine safe.
Click to show internal directories.
Click to hide internal directories.