Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAPIVersion ¶
Returns the API version that has been selected through APIVersion or MustAPIVersion. If the version has already been selected, then the first value returned is the API version and the error is nil. If the API version has not yet been set, then the error will be non-nil.
Types ¶
type Key ¶
type Key []byte
Key represents a FoundationDB key, a lexicographically-ordered sequence of bytes. Key implements the KeyConvertible interface.
type KeyConvertible ¶
type KeyConvertible interface {
FDBKey() Key
}
A KeyConvertible can be converted to a FoundationDB Key. All functions in the FoundationDB API that address a specific key accept a KeyConvertible.
type KeySelector ¶
type KeySelector struct { Key KeyConvertible OrEqual bool Offset int }
KeySelector represents a description of a key in a FoundationDB database. A KeySelector may be resolved to a specific key with the GetKey method, or used as the endpoints of a SelectorRange to be used with a GetRange function.
The most common key selectors are constructed with the functions documented below. For details of how KeySelectors are specified and resolved, see https://apple.github.io/foundationdb/developer-guide.html#key-selectors.
func FirstGreaterOrEqual ¶
func FirstGreaterOrEqual(key KeyConvertible) KeySelector
FirstGreaterOrEqual returns the KeySelector specifying the lexigraphically least key present in the database which is lexigraphically greater than or equal to the given key.
func FirstGreaterThan ¶
func FirstGreaterThan(key KeyConvertible) KeySelector
FirstGreaterThan returns the KeySelector specifying the lexigraphically least key present in the database which is lexigraphically strictly greater than the given key.
func LastLessOrEqual ¶
func LastLessOrEqual(key KeyConvertible) KeySelector
LastLessOrEqual returns the KeySelector specifying the lexigraphically greatest key present in the database which is lexigraphically less than or equal to the given key.
func LastLessThan ¶
func LastLessThan(key KeyConvertible) KeySelector
LastLessThan returns the KeySelector specifying the lexigraphically greatest key present in the database which is lexigraphically strictly less than the given key.
func (KeySelector) FDBKeySelector ¶
func (ks KeySelector) FDBKeySelector() KeySelector
type Selectable ¶
type Selectable interface {
FDBKeySelector() KeySelector
}
A Selectable can be converted to a FoundationDB KeySelector. All functions in the FoundationDB API that resolve a key selector to a key accept Selectable.