View Source erlfdb_key (erlfdb v0.3.1)
Operations on keys, either by your client Layer, or by the FoundationDB server itself.
Summary
Functions
Creates a 'first_greater_or_equal' key selector.
Creates a 'first_greater_than' key selector.
Creates a 'last_less_or_equal' key selector.
Creates a 'last_less_than' key selector.
Transforms a list of keys into a list of partitioning ranges using the keys as split points.
Performs a lexocographic increment operation on a binary key.
Functions
Creates a 'first_greater_or_equal' key selector.
Creates a 'first_greater_than' key selector.
Creates a 'last_less_or_equal' key selector.
Creates a 'last_less_than' key selector.
Transforms a list of keys into a list of partitioning ranges using the keys as split points.
Examples
1> Keys = [<<"a">>, <<"b">>, <<"c">>].
2> erlfdb_key:list_to_ranges(Keys).
[
{<<"a">>, <<"b">>},
{<<"b">>, <<"c">>}
]
Performs a lexocographic increment operation on a binary key.
The resulting key is the first possible key that is lexicographically ordered after all keys beginning with the input.
Examples
1> erlfdb_key:strinc(<<0>>).
<<1>>
1> erlfdb_key:strinc(<<"hello">>).
<<"hellp">>
1> erlfdb_key:strinc(<<"hello", 16#FF>>).
<<"hellp">>