Documentation
¶
Overview ¶
Package kvbadger implements Visvasity Key-Value DB API adapter for the Badger Database.
Index ¶
- type Database
- type Snapshot
- func (t Snapshot) Ascend(ctx context.Context, beg, end string, errp *error) iter.Seq2[string, io.Reader]
- func (t Snapshot) Commit(ctx context.Context) error
- func (t Snapshot) Delete(ctx context.Context, k string) error
- func (t Snapshot) Descend(ctx context.Context, beg, end string, errp *error) iter.Seq2[string, io.Reader]
- func (s *Snapshot) Discard(ctx context.Context) error
- func (t Snapshot) Get(ctx context.Context, k string) (io.Reader, error)
- func (t Snapshot) Scan(ctx context.Context, errp *error) iter.Seq2[string, io.Reader]
- func (t Snapshot) Set(ctx context.Context, k string, v io.Reader) error
- type Transaction
- func (t Transaction) Ascend(ctx context.Context, beg, end string, errp *error) iter.Seq2[string, io.Reader]
- func (t Transaction) Commit(ctx context.Context) error
- func (t Transaction) Delete(ctx context.Context, k string) error
- func (t Transaction) Descend(ctx context.Context, beg, end string, errp *error) iter.Seq2[string, io.Reader]
- func (t Transaction) Get(ctx context.Context, k string) (io.Reader, error)
- func (t *Transaction) Rollback(ctx context.Context) error
- func (t Transaction) Scan(ctx context.Context, errp *error) iter.Seq2[string, io.Reader]
- func (t Transaction) Set(ctx context.Context, k string, v io.Reader) error
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
}
func (*Database) NewSnapshot ¶
NewSnapshot returns a snapshot, which is just a read-only transaction.
func (*Database) NewTransaction ¶
func (d *Database) NewTransaction(ctx context.Context) (*Transaction, error)
NewTransaction returns a new read-write transaction.
type Snapshot ¶
type Snapshot struct {
// contains filtered or unexported fields
}
func (Snapshot) Ascend ¶
func (t Snapshot) Ascend(ctx context.Context, beg, end string, errp *error) iter.Seq2[string, io.Reader]
Ascend returns key-value pairs in a given range through the iterator, in ascending order.
func (Snapshot) Descend ¶
func (t Snapshot) Descend(ctx context.Context, beg, end string, errp *error) iter.Seq2[string, io.Reader]
Descend returns key-value pairs in a given range through the iterator, in descending order.
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
func (Transaction) Ascend ¶
func (t Transaction) Ascend(ctx context.Context, beg, end string, errp *error) iter.Seq2[string, io.Reader]
Ascend returns key-value pairs in a given range through the iterator, in ascending order.
func (Transaction) Descend ¶
func (t Transaction) Descend(ctx context.Context, beg, end string, errp *error) iter.Seq2[string, io.Reader]
Descend returns key-value pairs in a given range through the iterator, in descending order.
func (*Transaction) Rollback ¶
func (t *Transaction) Rollback(ctx context.Context) error
Rollback drops the transaction.
Click to show internal directories.
Click to hide internal directories.