me.vedang.clj-fdb.core
clear
(clear tc k)
(clear tc s k)
Takes the following: - TransactionContext tc
- key to be cleared k
and clears the key from the db. Returns nil.
clear-range
(clear-range tc r)
(clear-range tc s t)
Takes the following: - TransactionContext tc
- Range of keys to be cleared rg
and clears the range from the db. Returns nil.
get
(get tc k parsefn)
(get tc s k parsefn)
Takes the following: - TransactionContext tc
- key to be fetched k
(should be byte-array, or convertible to byte-array) - Function parsefn
taking the stored byte-array at k
and converting it to the appropriate return value v
Optionally, you can also pass a Subspace
s
, under which the key is stored.
get-range
(get-range tc r-or-s keyfn valfn)
(get-range tc s t keyfn valfn)
Takes the following: - TransactionContext tc
- Range of keys to fetch or a Subspace r-or-s
- IF r-or-s
is a Subspace, can also accept t
, a Tuple within that Subspace - keyfn
and valfn
, to transform the key/value to the correct format.
and returns a map of key/value pairs.
Note that this function is greedy and forces the evaluation of the entire iterable. Use with care. If you want to get a lazy iterator, use the underlying get-range functions from ftr
or fsub
namespaces.
set
(set tc k v)
(set tc s k v)
Takes the following: - TransactionContext tc
- key to be stored k
(should be byte-array, or convertible to byte-array) - value to be stored v
(should be byte-array, or convertible to byte-array)
and stores v
against k
in FDB. Returns nil.
Optionally, you can also pass a Subspace
s
under which the key will be stored.