fdbclient

package
v0.2.29 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SplitRangeOptions

func SplitRangeOptions(opts []*RangeOptions) fdb.RangeOptions

Types

type Database

type Database interface {
	NewTransaction(ctx context.Context) (Transaction, error)
	Clear(ctx context.Context, key []byte) error
}

func NewDatabase

func NewDatabase(db fdb.Database) Database

type RangeOptions

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

func (*RangeOptions) SetLimit

func (r *RangeOptions) SetLimit(limit int)

func (*RangeOptions) SetMode

func (r *RangeOptions) SetMode(mode fdb.StreamingMode)

func (*RangeOptions) SetReverse

func (r *RangeOptions) SetReverse()

type Transaction

type Transaction interface {
	Get(key []byte) (value []byte, err error)
	Set(key []byte, value []byte)
	Clear(key []byte)
	ClearRange(key []byte) error
	Commit() (err error)
	GetRange(pr fdb.KeyRange, opts ...*RangeOptions) ([]fdb.KeyValue, error)
	GetIterator(pr fdb.KeyRange, opts ...*RangeOptions) *fdb.RangeIterator
}

func NewTransaction

func NewTransaction(ctx context.Context, db fdb.Database) (Transaction, error)

Jump to

Keyboard shortcuts

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