Documentation ¶
Index ¶
- func Decrement(tx Tx, k []byte) (uint64, error)
- func DoRet1[T any](ctx context.Context, db DB, isWrite bool, fn func(tx Tx) (T, error)) (T, error)
- func DoRet2[A, B any](ctx context.Context, db DB, isWrite bool, fn func(tx Tx) (A, B, error)) (A, B, error)
- func Increment(tx Tx, k []byte) (uint64, error)
- func PrefixEnd(prefix []byte) []byte
- type Badger
- type DB
- type Tx
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DoRet2 ¶
func DoRet2[A, B any](ctx context.Context, db DB, isWrite bool, fn func(tx Tx) (A, B, error)) (A, B, error)
DoRet2 is a convenience function for performing a transaction and returning 2 values
Types ¶
Click to show internal directories.
Click to hide internal directories.