Liking cljdoc? Tell your friends :D
Clojure only.

toucan2.tools.named-query


define-named-querycljmacro

(define-named-query query-name resolved-query)
(define-named-query query-name query-type model resolved-query)

Helper for defining 'named' queries.

;; define a custom query ::my-count that you can then use with select and the like
(define-named-query ::my-count
  {:select [:%count.*], :from [(keyword (model/table-name model))]})

(select :model/user ::my-count)
Helper for defining 'named' queries.

```clj
;; define a custom query ::my-count that you can then use with select and the like
(define-named-query ::my-count
  {:select [:%count.*], :from [(keyword (model/table-name model))]})

(select :model/user ::my-count)
```
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close