Documentation ¶
Index ¶
- type DB
- func (db *DB) Close() error
- func (db *DB) CmpAndSwap(bucket, key, oldValue, newValue []byte) ([]byte, bool, error)
- func (db *DB) CreateTable(bucket []byte) error
- func (db *DB) Del(bucket, key []byte) error
- func (db *DB) DeleteTable(bucket []byte) error
- func (db *DB) Get(bucket, key []byte) (ret []byte, err error)
- func (db *DB) List(bucket []byte) ([]*database.Entry, error)
- func (db *DB) Open(dir string, opt ...database.Option) (err error)
- func (db *DB) Set(bucket, key, value []byte) error
- func (db *DB) Update(txn *database.Tx) error
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 is a wrapper over *badger.DB,
func (*DB) CmpAndSwap ¶
CmpAndSwap modifies the value at the given bucket and key (to newValue) only if the existing (current) value matches oldValue.
func (*DB) CreateTable ¶
CreateTable creates a token element with the 'bucket' prefix so that such that their appears to be a table.
func (*DB) DeleteTable ¶
DeleteTable deletes a root or embedded bucket. Returns an error if the bucket cannot be found or if the key represents a non-bucket value.
Click to show internal directories.
Click to hide internal directories.