The :lookup operation is used for queries against indexes, when you need to be explicit.
One thing to know about :lookup is you cannot materialize it, it is fairly unique in that regard.
(def CustomerByName [[:from :Customer] [:hash :firstname]])
(def db (rel/materialize {} CustomerByName))
(def db (rel/transact {} [:insert :Customer {:firstname "bob"}]))
(rel/q db [[:lookup CustomerByName "bob"]])
;; =>
({:firstname "bob"})
Can you improve this documentation?Edit on GitHub
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 |