Documentation ¶
Index ¶
- Variables
- func New(path string, cache uint, maxOpenFiles int, logger pebble.Logger) (db.DB, error)
- func NewMem() (db.DB, error)
- func NewMemTest(t *testing.T) db.DB
- type DB
- type Transaction
- func (t *Transaction) Commit() error
- func (t *Transaction) Delete(key []byte) error
- func (t *Transaction) Discard() error
- func (t *Transaction) Get(key []byte, cb func([]byte) error) error
- func (t *Transaction) Impl() any
- func (t *Transaction) NewIterator() (db.Iterator, error)
- func (t *Transaction) Set(key, val []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDiscardedTransaction = errors.New("discarded txn")
Functions ¶
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) NewTransaction ¶
func (d *DB) NewTransaction(update bool) (db.Transaction, error)
NewTransaction : see db.DB.NewTransaction
func (*DB) Update ¶
func (d *DB) Update(fn func(txn db.Transaction) error) error
Update : see db.DB.Update
func (*DB) WithListener ¶ added in v0.7.0
func (d *DB) WithListener(listener db.EventListener) db.DB
WithListener registers an EventListener
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
func (*Transaction) Commit ¶
func (t *Transaction) Commit() error
Commit : see db.Transaction.Commit
func (*Transaction) Delete ¶
func (t *Transaction) Delete(key []byte) error
Delete : see db.Transaction.Delete
func (*Transaction) Discard ¶
func (t *Transaction) Discard() error
Discard : see db.Transaction.Discard
func (*Transaction) Get ¶
func (t *Transaction) Get(key []byte, cb func([]byte) error) error
Get : see db.Transaction.Get
func (*Transaction) NewIterator ¶
func (t *Transaction) NewIterator() (db.Iterator, error)
NewIterator : see db.Transaction.NewIterator
func (*Transaction) Set ¶
func (t *Transaction) Set(key, val []byte) error
Set : see db.Transaction.Set
Click to show internal directories.
Click to hide internal directories.