Liking cljdoc? Tell your friends :D

fdb-clj.core


*directory*clj


delete-keyclj

(delete-key tr key & {:keys [directory] :or {directory *directory*}})

get-rangeclj

(get-range tr {start-path :path start-key :key} {end-path :path end-key :key})

get-valclj

(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]
```
raw docstring

key->packed-tupleclj

(key->packed-tuple key)

Pack the key with respect to Tuple encoding

Pack the key with respect to Tuple encoding
raw docstring

key->tupleclj

(key->tuple key)

Return tuple encoding for the given key

Return tuple encoding for the given key
raw docstring

make-rangeclj

(make-range tr start & {:keys [directory] :or {directory *directory*}})

openclj

(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.
raw docstring

set-valclj

(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))))
```
raw docstring

tr!cljmacro

(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))))
```
raw docstring

watch!clj

(watch! tr key & {:keys [directory] :or {directory *directory*}})

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close