kvdb

package
v0.0.0-...-a1ac4f3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KvDB

type KvDB struct {
	// contains filtered or unexported fields
}

func Open

func Open() *KvDB

func (*KvDB) Batch

func (kv *KvDB) Batch() *badger.WriteBatch

func (*KvDB) Cancel

func (kv *KvDB) Cancel() *badger.WriteBatch

func (*KvDB) Close

func (kv *KvDB) Close() error

func (*KvDB) DB

func (kv *KvDB) DB() *badger.DB

func (*KvDB) Del

func (kv *KvDB) Del(key []byte) error

func (*KvDB) Discard

func (kv *KvDB) Discard()

func (*KvDB) Exec

func (kv *KvDB) Exec() error

func (*KvDB) Exists

func (kv *KvDB) Exists(key []byte) bool

Check if key exists.

func (*KvDB) Flush

func (kv *KvDB) Flush() *badger.WriteBatch

func (*KvDB) Get

func (kv *KvDB) Get(key []byte) ([]byte, error)

func (*KvDB) Multi

func (kv *KvDB) Multi() *badger.Txn

func (*KvDB) Search

func (kv *KvDB) Search(prefix []byte, limit uint, offset uint) ([][]byte, error)

func (*KvDB) Set

func (kv *KvDB) Set(key []byte, val []byte) error

func (*KvDB) SetNX

func (kv *KvDB) SetNX(key []byte, val []byte) error

Set key to hold string value if key does not exist. In that case, it is equal to SET. When key already holds a value, no operation is performed. SETNX is short for "SET if Not eXists".

func (*KvDB) SetNxTx

func (kv *KvDB) SetNxTx(key []byte, val []byte, txn *badger.Txn) error

func (*KvDB) SetNxWb

func (kv *KvDB) SetNxWb(key []byte, val []byte, wb *badger.WriteBatch) (bool, error)

func (*KvDB) SetTx

func (kv *KvDB) SetTx(key []byte, val []byte, txn *badger.Txn) error

func (*KvDB) SetWb

func (kv *KvDB) SetWb(key []byte, val []byte, wb *badger.WriteBatch) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL