Liking cljdoc? Tell your friends :D

codax.operations


assoc-pathclj

(assoc-path tx path v)
source

collectclj

(collect tx path)

Returns a map assembled from the keys beginning with the that begin with the complete supplied path conjoined with the transaction prefix.

Ex. If the transaction tx has no prefix & the database contains:

[ key ] | val

[:dept :art :alice] | 1 [:dept :bio-tech :bob] | 2 [:dept :biology :chloe] | 3 [:dept :biology :daniel] | 4 [:dept :biology :ellen] | 5 [:dept :botany :frank] | 6

(collect tx [] -> {:dept {:art {:alice 1} :bio-tech {:bob 2} :biology {:chloe 3 :daniel 4 :ellen 5} :botant {:frank 6}}}

(collect tx [:dept :biology]) -> {:chloe 3 :daniel 4 :ellen 5}}

Ex. If, however the transaction prefix was [:dept]:

(seek tx [:biology]) -> {:chloe 3 :daniel 4 :ellen 5}}

Returns a map assembled from the keys beginning with the
that begin with the complete supplied `path` conjoined with
the transaction prefix.

Ex. If the transaction `tx` has no prefix & the database contains:

[ key ]                   | val
-------------------------------
[:dept :art      :alice]  |  1
[:dept :bio-tech   :bob]  |  2
[:dept :biology  :chloe]  |  3
[:dept :biology :daniel]  |  4
[:dept :biology  :ellen]  |  5
[:dept :botany   :frank]  |  6
-------------------------------

(collect tx [] -> {:dept
                   {:art {:alice 1}
                    :bio-tech {:bob 2}
                    :biology {:chloe 3
                              :daniel 4
                              :ellen 5}
                    :botant  {:frank 6}}}


(collect tx [:dept :biology]) -> {:chloe 3
                                  :daniel 4
                                  :ellen 5}}


Ex. If, however the transaction prefix was `[:dept]`:

(seek tx [:biology]) -> {:chloe 3
                         :daniel 4
                         :ellen 5}}
sourceraw docstring

delete-pathclj

(delete-path tx path)
source

delete-valclj

(delete-val tx path)
source

get-valclj

(get-val tx path)
source

put-valclj

(put-val tx path v)
source

seekclj

(seek tx)
(seek tx path)
(seek tx start-path end-path & {:keys [no-decode only-keys]})
source

seek-fromclj

(seek-from tx path start-val limit reverse)
source

seek-pathclj

(seek-path tx path limit reverse)
source

seek-prefixclj

(seek-prefix tx path val-prefix limit reverse)
source

seek-prefix-rangeclj

(seek-prefix-range tx path start-prefix end-prefix limit reverse)
source

seek-rangeclj

(seek-range tx path start-val end-val limit reverse)
source

seek-toclj

(seek-to tx path end-val limit reverse)
source

update-pathclj

(update-path tx path f & args)
source

update-valclj

(update-val tx path f & args)
source

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

× close