Documentation
¶
Index ¶
- Variables
- func SplitKey(key []byte, dynamic bool) ([]bdb.Key, bdb.Key)
- type ByteMap
- type ByteSet
- type ByteTree
- func (ctx *ByteTree) Delete(primType bdb.Decoder, fullKey []byte) (bool, error)
- func (ctx *ByteTree) FindBundleWithBytes(primType bdb.Decoder, fullKey []byte) (bdb.Key, *bdb.Bundle, error)
- func (ctx *ByteTree) Read(primType bdb.Decoder, fullKey []byte) (bdb.Value, bool, error)
- func (ctx *ByteTree) Write(primType bdb.Decoder, fullKey []byte, value bdb.Value) (bool, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // For Sets and Maps with Variable length keys, each node needs to be an // Either Primitive. It is Either a Value or another node, or both. // That way we can store "abcdefgh" And "abcdefgh12345678" in the same tree. VarMapPaths = []bdb.Decoder{bdb.DecodeTuple, bdb.DecodeMap} )
Functions ¶
Types ¶
type ByteTree ¶
A ByteTree is an abstraction of a Root to deal with keys of an arbitrary length. Keys are broken up into chunks of `PRIMKEY_LENGTH`. Byte trees keys are always zero padded to the the next highest multiple of `PRIMKEY_LENGTH`.
If the keys are of fixed length, all intermediate nodes will be maps.
If the keys are of variable length, intermediate nodes will be a combination of tuples and maps so that keys that share the same prefix like "abcdefgh" and "abcdefgh12345678" wont conflict.
func NewByteTree ¶
func (*ByteTree) FindBundleWithBytes ¶
Click to show internal directories.
Click to hide internal directories.