(clear tc k & {:keys [keyfn] :or {keyfn bs/to-byte-array}})
Takes the following:
tc
k
and clears the key from the db. Returns nil.
Optionally, you can pass in :keyfn
as follows:
:keyfn
should take the key as input and transform it to a
byte-array. An exception is thrown if the return value is not a
byte-array. If no :keyfn
is provided, we convert the key to a
byte-array using byte-streams/to-byte-array
.Takes the following: - TransactionContext `tc` - key to be cleared `k` and clears the key from the db. Returns nil. Optionally, you can pass in `:keyfn` as follows: - `:keyfn` should take the key as input and transform it to a byte-array. An exception is thrown if the return value is not a byte-array. If no `:keyfn` is provided, we convert the key to a byte-array using `byte-streams/to-byte-array`.
(clear-range tc rg)
Takes the following:
tc
rg
and clears the range from the db. Returns nil.
Takes the following: - TransactionContext `tc` - Range of keys to be cleared `rg` and clears the range from the db. Returns nil.
(clear-subspaced-key tc s t)
Takes the following:
tc
s
which will used to namespace the keyt
will be used along with s
to construct keyand clears the Subspaced key from db. Returns nil.
Takes the following: - TransactionContext `tc` - Subspace `s` which will used to namespace the key - Tuple `t` will be used along with `s` to construct key and clears the Subspaced key from db. Returns nil.
(clear-subspaced-range tc s)
(clear-subspaced-range tc s t)
Takes the following:
tc
s
which will used to namespace the keyand clears the range from db. Returns nil.
Optionally, you can pass in :t
as follows:
:t
will be used along with s
to construct namespaced key. t
should be of type Tuple
.Takes the following: - TransactionContext `tc` - Subspace `s` which will used to namespace the key and clears the range from db. Returns nil. Optionally, you can pass in `:t` as follows: - `:t` will be used along with `s` to construct namespaced key. `t` should be of type `Tuple`.
(get tc k & {:keys [keyfn valfn] :or {keyfn bs/to-byte-array valfn identity}})
Takes the following:
tc
k
and returns byte-array v
against k
in FDB.
Optionally, you can pass in :keyfn
and :valfn
as follows:
:keyfn
should take the key as input and transform it to a
byte-array. An exception is thrown if the return value is not a
byte-array. If no :keyfn
is provided, we convert the key to a
byte-array using byte-streams/to-byte-array
.:valfn
should accept a byte-array and convert it as desired by
the caller. If no :valfn
is provided, we return the byte-array as
is.Takes the following: - TransactionContext `tc` - key to be fetched `k` and returns byte-array `v` against `k` in FDB. Optionally, you can pass in `:keyfn` and `:valfn` as follows: - `:keyfn` should take the key as input and transform it to a byte-array. An exception is thrown if the return value is not a byte-array. If no `:keyfn` is provided, we convert the key to a byte-array using `byte-streams/to-byte-array`. - `:valfn` should accept a byte-array and convert it as desired by the caller. If no `:valfn` is provided, we return the byte-array as is.
(get-range tc rg & {:keys [keyfn valfn] :or {keyfn identity valfn identity}})
Takes the following:
tc
rg
and returns a map of key/value pairs (byte-array->byte-array).
Optionally, you can pass in :keyfn
and :valfn
to transform the
key/value to the correct format. :keyfn
should accept a byte-array
representing the key, :valfn
should accept a byte-array
representing the value.
Takes the following: - TransactionContext `tc` - Range of keys to fetch `rg` and returns a map of key/value pairs (byte-array->byte-array). Optionally, you can pass in `:keyfn` and `:valfn` to transform the key/value to the correct format. `:keyfn` should accept a byte-array representing the key, `:valfn` should accept a byte-array representing the value.
(get-subspaced-key tc s t & {:keys [valfn] :or {valfn identity}})
Takes the following:
tc
s
which will be used to namespace the keyt
will be used along with s
to construct keyand returns byte-array v
against key constructed using s
and t
.
Optionally, you can pass in :valfn
as follows:
:valfn
should accept a byte-array and convert it as desired by the caller.
If no :valfn
is provided, we return the byte-array as is.Takes the following: - TransactionContext `tc` - Subspace `s` which will be used to namespace the key - Tuple `t` will be used along with `s` to construct key and returns byte-array `v` against key constructed using `s` and `t`. Optionally, you can pass in `:valfn` as follows: - `:valfn` should accept a byte-array and convert it as desired by the caller. If no `:valfn` is provided, we return the byte-array as is.
(get-subspaced-range tc
s
t
&
{:keys [keyfn valfn] :or {keyfn identity valfn identity}})
Takes the following:
tc
s
which will used to namespace the keyt
will be used along with s
to construct keyand returns a map of key/value pairs (byte-array->byte-array).
Optionally, you can pass in :keyfn
and :valfn
as follows:
:keyfn
can be passed to transform key to correct format.
If no :keyfn
is provided, we return the byte-array as is.:valfn
can be passed to tranform value to correct format.
If no :valfn
is provided, we return the byte-array as is.Takes the following: - TransactionContext `tc` - Subspace `s` which will used to namespace the key - Tuple `t` will be used along with `s` to construct key and returns a map of key/value pairs (byte-array->byte-array). Optionally, you can pass in `:keyfn` and `:valfn` as follows: - `:keyfn` can be passed to transform key to correct format. If no `:keyfn` is provided, we return the byte-array as is. - `:valfn` can be passed to tranform value to correct format. If no `:valfn` is provided, we return the byte-array as is.
(set tc
k
v
&
{:keys [keyfn valfn] :or {keyfn bs/to-byte-array valfn bs/to-byte-array}})
Takes the following:
tc
k
v
and stores v
against k
in FDB. Returns nil.
Optionally, you can pass in :keyfn
and :valfn
to transform the
key/value to a byte-array. An exception is thrown if these fns don't
return a byte-array. If no conversion fn is provided, we attemp to
convert k/v to byte-array using byte-streams/to-byte-array
.
Takes the following: - TransactionContext `tc` - key to be stored `k` - key to be stored `v` and stores `v` against `k` in FDB. Returns nil. Optionally, you can pass in `:keyfn` and `:valfn` to transform the key/value to a byte-array. An exception is thrown if these fns don't return a byte-array. If no conversion fn is provided, we attemp to convert k/v to byte-array using `byte-streams/to-byte-array`.
(set-subspaced-key tc s t v & {:keys [valfn] :or {valfn bs/to-byte-array}})
Takes the following:
tc
s
which will be used to namespace the keyt
will be used along with s
to construct keyv
and stores v
against key constructed using s
and t
in DB. Returns nil.
Optionally, you can pass in :valfn
as follows:
:valfn
to transform the v
to a byte-array. If :valfn
is not provided,
bs/to-byte-array
is used to transform v
.Takes the following: - TransactionContext `tc` - Subspace `s` which will be used to namespace the key - Tuple `t` will be used along with `s` to construct key - Value to be stored `v` and stores `v` against key constructed using `s` and `t` in DB. Returns nil. Optionally, you can pass in `:valfn` as follows: - `:valfn` to transform the `v` to a byte-array. If `:valfn` is not provided, `bs/to-byte-array` is used to transform `v`.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close