(delete-key tr key & {:keys [directory] :or {directory *directory*}})(get-range tr {start-path :path start-key :key} {end-path :path end-key :key})(get-val tr key & {:keys [directory] :or {directory *directory*}})Get the value for the given key. Accepts the below : :subspace - Subspace to be prefixed :coll - Boolean to indicate if the value needs to be deserialized as collection
(let [fd (select-api-version 520)
key "foo"]
(with-open [db (open fd)]
(tr! db
(get-val tr key))))
(let [fd (select-api-version 520)
key "foo"
value [1 2 3]]
(with-open [db (open fd)]
(tr! db
(set-val tr key value)
(get-val tr key) ;; 1
(get-val tr key :coll true)))) ;; [1 2 3]
Get the value for the given key. Accepts the below :
:subspace - Subspace to be prefixed
:coll - Boolean to indicate if the value needs to be deserialized as collection
```
(let [fd (select-api-version 520)
key "foo"]
(with-open [db (open fd)]
(tr! db
(get-val tr key))))
(let [fd (select-api-version 520)
key "foo"
value [1 2 3]]
(with-open [db (open fd)]
(tr! db
(set-val tr key value)
(get-val tr key) ;; 1
(get-val tr key :coll true)))) ;; [1 2 3]
```
(key->packed-tuple key)Pack the key with respect to Tuple encoding
Pack the key with respect to Tuple encoding
(key->tuple key)Return tuple encoding for the given key
Return tuple encoding for the given key
(make-range tr start & {:keys [directory] :or {directory *directory*}})(open db)(open db cluster)Initializes networking, connects with the default fdb.cluster file, and opens the database.
Initializes networking, connects with the default fdb.cluster file, and opens the database.
(set-val tr key val & {:keys [directory] :or {directory *directory*}})Set a value for the key. Accepts the below : :subspace - Subspace to be prefixed
(let [fd (select-api-version 520)
key "foo"
value "bar"]
(with-open [db (open fd)]
(tr! db
(set-val tr key value))))
Set a value for the key. Accepts the below :
:subspace - Subspace to be prefixed
```
(let [fd (select-api-version 520)
key "foo"
value "bar"]
(with-open [db (open fd)]
(tr! db
(set-val tr key value))))
```
(tr! db & actions)Transaction macro to perform actions. Always use tr for actions inside each action since the transaction variable is bound to tr in the functions.
(let [fd (select-api-version 520)
key "foo"
value "bar"]
(with-open [db (open fd)]
(tr! db
(set-val tr key value)
(get-val tr key))))
Transaction macro to perform actions. Always use tr for actions inside
each action since the transaction variable is bound to tr in the functions.
```
(let [fd (select-api-version 520)
key "foo"
value "bar"]
(with-open [db (open fd)]
(tr! db
(set-val tr key value)
(get-val tr key))))
```
(watch! tr key & {:keys [directory] :or {directory *directory*}})cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |