keys

package
v1.0.0-alpha.21 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

type Key interface {
	fmt.Stringer

	// Table is logical representation of namespace, database, and collection. Table can also be used as a random
	// bytes to group related data together.
	Table() []byte
	// IndexParts is the remaining parts of the key which is appended to the table to form a FDB key. Different packages
	// may be using this differently. The encoder in metadata package use it by adding the index identifier and value(s)
	// associated with a single or composite index. The identifier is used to differentiate whether encoding is for primary
	// key index or some other user defined index. Essentially to encode key for a given row. Some other internal packages
	// may use this as simply to form a key without any significance of index identifier.
	IndexParts() []interface{}
}

Key is an interface that provides an encoded key which will be used for storing Key, Value in FDB. The Key has two elements, the first set of bytes is the encoded table name and the remaining is the actual index values.

func NewKey

func NewKey(table []byte, indexParts ...interface{}) Key

NewKey returns the Key.

Jump to

Keyboard shortcuts

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