Documentation
¶
Index ¶
- type Key
- type Namespace
- type Range
- type Tree
- func (t *Tree) Delete(key *Key) error
- func (t *Tree) Exists(key *Key) (bool, error)
- func (t *Tree) Get(key *Key) ([]byte, error)
- func (t *Tree) Insert(key *Key, value []byte) error
- func (t *Tree) IterateOnRange(rng *Range, reverse bool, fn func(*Key, []byte) error) error
- func (t *Tree) NewMaxTypeForType(tp types.ValueType) types.ValueType
- func (t *Tree) NewMinValueForType(tp types.ValueType) types.Value
- func (t *Tree) Put(key *Key, value []byte) error
- func (t *Tree) Truncate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Key ¶
func NewEncodedKey ¶ added in v0.15.0
type Range ¶
A Range of keys to iterate on. By default, Min and Max are inclusive. If Exclusive is true, Min and Max are excluded from the results.
type Tree ¶
A Tree is an abstraction over a k-v store that allows manipulating data using high level keys and values of the Genji type system. Trees are used as the basis for tables and indexes. The key of a tree is a composite combination of several values, while the value can be any value of Genji's type system. The tree ensures all keys are sort-ordered according to the rules of the types package operators. A Tree doesn't support duplicate keys.
func NewTransient ¶ added in v0.15.0
func (*Tree) Delete ¶
Delete a key from the tree. If the key doesn't exist, it returns kv.ErrKeyNotFound.
func (*Tree) Insert ¶ added in v0.15.0
Insert adds a key-doc combination to the tree. If the key already exists, it returns kv.ErrKeyAlreadyExists.
func (*Tree) IterateOnRange ¶
IterateOnRange iterates on all keys that are in the given range.