Versions in this module Expand all Collapse all v0 v0.9.1 Jun 28, 2024 v0.9.0 May 4, 2024 Changes in this version + const Name + func OpenPath(path string) (flat.KV, error) + type DB struct + func New(d *badger.DB) *DB + func Open(opt badger.Options) (*DB, error) + func (db *DB) Close() error + func (db *DB) DB() *badger.DB + func (db *DB) Tx(ctx context.Context, rw bool) (flat.Tx, error) + func (db *DB) Update(ctx context.Context, fn func(tx flat.Tx) error) error + func (db *DB) View(ctx context.Context, fn func(tx flat.Tx) error) error + type Iterator struct + func (it *Iterator) Close() error + func (it *Iterator) Err() error + func (it *Iterator) Key() flat.Key + func (it *Iterator) Next(ctx context.Context) bool + func (it *Iterator) Reset() + func (it *Iterator) Seek(ctx context.Context, key flat.Key) bool + func (it *Iterator) Val() flat.Value + func (it *Iterator) WithPrefix(pref flat.Key) flat.Iterator + type Tx struct + func (tx *Tx) Close() error + func (tx *Tx) Commit(ctx context.Context) error + func (tx *Tx) Del(ctx context.Context, k flat.Key) error + func (tx *Tx) Get(ctx context.Context, key flat.Key) (flat.Value, error) + func (tx *Tx) GetBatch(ctx context.Context, keys []flat.Key) ([]flat.Value, error) + func (tx *Tx) Put(ctx context.Context, k flat.Key, v flat.Value) error + func (tx *Tx) Scan(ctx context.Context, opts ...flat.IteratorOption) flat.Iterator