(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:
(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}}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 |