Documentation
¶
Index ¶
- type DB
- func (db *DB) Close() error
- func (db *DB) Delete(key []byte) error
- func (db *DB) Fold(f func(key []byte, value []byte) bool) error
- func (db *DB) Get(key []byte) ([]byte, error)
- func (db *DB) GetListKeys() [][]byte
- func (db *DB) Merge() error
- func (db *DB) NewIterator(opt config.IteratorOptions) *Iterator
- func (db *DB) NewWriteBatch(opt config.WriteBatchOptions) *WriteBatch
- func (db *DB) Put(key []byte, value []byte) error
- func (db *DB) Sync() error
- type Iterator
- type WriteBatch
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB bitcask Storage engine instance
func (*DB) Fold ¶
Fold Get all the data and perform the operation specified by the user. The function returns false to exit
func (*DB) GetListKeys ¶
GetListKeys Gets all the keys in the database
func (*DB) NewIterator ¶
func (db *DB) NewIterator(opt config.IteratorOptions) *Iterator
NewIterator 初始化迭代器
func (*DB) NewWriteBatch ¶
func (db *DB) NewWriteBatch(opt config.WriteBatchOptions) *WriteBatch
NewWriteBatch Init WriteBatch
type WriteBatch ¶
type WriteBatch struct {
// contains filtered or unexported fields
}
WriteBatch Writes data in atomic batches to ensure atomicity
func (*WriteBatch) Commit ¶
func (wb *WriteBatch) Commit() error
Commit The transaction commits, writes the transient data to the data file, and updates the in-memory index
func (*WriteBatch) Delete ¶
func (wb *WriteBatch) Delete(key []byte) error
Delete Batch deletion of data
Click to show internal directories.
Click to hide internal directories.