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 is a website building & hosting documentation for Clojure/Script libraries

× close