Documentation
¶
Index ¶
- type Batch
- type Database
- type Deleter
- type Putter
- type RDBDatabase
- func (db *RDBDatabase) Close()
- func (db *RDBDatabase) Delete(key []byte) error
- func (db *RDBDatabase) Get(key []byte) ([]byte, error)
- func (db *RDBDatabase) Has(key []byte) (bool, error)
- func (db *RDBDatabase) NewBatch() Batch
- func (db *RDBDatabase) NewIterator() *gorocksdb.Iterator
- func (db *RDBDatabase) NewIteratorWithPrefix(prefix []byte) *gorocksdb.Iterator
- func (db *RDBDatabase) Path() string
- func (db *RDBDatabase) Put(key []byte, value []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Batch ¶
Batch is a write-only database that commits changes to its host database when Write is called. Batch cannot be used concurrently.
type Deleter ¶
Deleter wraps the database delete operation supported by both batches and regular databases.
type Putter ¶
Putter wraps the database write operation supported by both batches and regular databases.
type RDBDatabase ¶
type RDBDatabase struct {
// contains filtered or unexported fields
}
func NewRDBDatabase ¶
func NewRDBDatabase(file string, clean bool) (*RDBDatabase, error)
NewRDBDatabase returns a rocksdb wrapped object.
func (*RDBDatabase) Close ¶
func (db *RDBDatabase) Close()
func (*RDBDatabase) Delete ¶
func (db *RDBDatabase) Delete(key []byte) error
Delete deletes the key from the queue and database
func (*RDBDatabase) Get ¶
func (db *RDBDatabase) Get(key []byte) ([]byte, error)
Get returns the given key if it's present.
func (*RDBDatabase) NewBatch ¶
func (db *RDBDatabase) NewBatch() Batch
func (*RDBDatabase) NewIterator ¶
func (db *RDBDatabase) NewIterator() *gorocksdb.Iterator
func (*RDBDatabase) NewIteratorWithPrefix ¶
func (db *RDBDatabase) NewIteratorWithPrefix(prefix []byte) *gorocksdb.Iterator
NewIteratorWithPrefix returns a iterator to iterate over subset of database content with a particular prefix.
func (*RDBDatabase) Path ¶
func (db *RDBDatabase) Path() string
Path returns the path to the database directory.
Click to show internal directories.
Click to hide internal directories.