Documentation
¶
Index ¶
- type Database
- func (d *Database) Close() error
- func (d *Database) Copy() *Database
- func (d *Database) Delete(key []byte) error
- func (d *Database) DeleteRange(start, end []byte) error
- func (d *Database) Get(key []byte, cb func(value []byte) error) error
- func (d *Database) Has(key []byte) (bool, error)
- func (d *Database) Impl() any
- func (d *Database) NewBatch() db.Batch
- func (d *Database) NewBatchWithSize(_ int) db.Batch
- func (d *Database) NewIndexedBatch() db.IndexedBatch
- func (d *Database) NewIndexedBatchWithSize(_ int) db.IndexedBatch
- func (d *Database) NewIterator(prefix []byte, withUpperBound bool) (db.Iterator, error)
- func (d *Database) NewSnapshot() db.Snapshot
- func (d *Database) Put(key, value []byte) error
- func (d *Database) Update(fn func(db.IndexedBatch) error) error
- func (d *Database) View(fn func(db.Snapshot) error) error
- func (d *Database) WithListener(listener db.EventListener) db.KeyValueStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
Represents an in-memory key-value store. It is thread-safe.
func (*Database) DeleteRange ¶
func (*Database) NewIndexedBatch ¶
func (d *Database) NewIndexedBatch() db.IndexedBatch
func (*Database) NewIndexedBatchWithSize ¶
func (d *Database) NewIndexedBatchWithSize(_ int) db.IndexedBatch
func (*Database) NewIterator ¶
func (*Database) NewSnapshot ¶
func (*Database) WithListener ¶
func (d *Database) WithListener(listener db.EventListener) db.KeyValueStore
Click to show internal directories.
Click to hide internal directories.