(defretriever name doc-string? attr-map? [params*] prepost-map? body)(defretriever name
doc-string?
attr-map?
([params*] prepost-map? body)
+
attr-map?)Define a Urania DataSource + BatchedSource pair with a uniform backend.
Signature mirrors defn:
(defretriever name "optional docstring" {:decorate-fn (fn [value & more] ...) :tag :optional-tag} [env ids & more] body)
The function body becomes the backend implementation and must return
either a promise or a map of {id -> value}. The generated retriever
is then available via (fetch :tag id & decorate-args) (or use
(fetch ::name ...) when you skip :tag).
Define a Urania DataSource + BatchedSource pair with a uniform backend.
Signature mirrors `defn`:
(defretriever name
"optional docstring"
{:decorate-fn (fn [value & more] ...)
:tag :optional-tag}
[env ids & more]
body)
The function body becomes the backend implementation and must return
either a promise or a map of {id -> value}. The generated retriever
is then available via `(fetch :tag id & decorate-args)` (or use
`(fetch ::name ...)` when you skip `:tag`).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 |