Liking cljdoc? Tell your friends :D

toucan2.execute

Code for executing queries and statements, and reducing their results.

Code for executing queries and statements, and reducing their results.
raw docstring

*call-count-thunk*clj

Thunk function to call every time a query is executed if with-call-count is in use.

Thunk function to call every time a query is executed if [[with-call-count]] is in use.
raw docstring

compilecljmacro

(compile & body)

Return the compiled query that would be executed by a form, rather than executing that form itself.

(delete/delete :table :id 1) => ["DELETE FROM table WHERE ID = ?" 1]

Return the compiled query that would be executed by a form, rather than executing that form itself.

(delete/delete :table :id 1)
=>
["DELETE FROM table WHERE ID = ?" 1]
raw docstring

do-with-call-countsclj

(do-with-call-counts f)

Impl for with-call-count macro; don't call this directly.

Impl for [[with-call-count]] macro; don't call this directly.
raw docstring

queryclj

(query queryable)
(query connectable queryable)
(query connectable modelable queryable)

query-oneclj

(query-one queryable)
(query-one connectable queryable)
(query-one connectable modelable queryable)

reduce-compiled-queryclj

(reduce-compiled-query connectable model compiled-query rf init)

reduce-compiled-query-with-connectionclj

(reduce-compiled-query-with-connection conn model compiled-query rf init)

reduce-uncompiled-queryclj

(reduce-uncompiled-query connectable model query rf init)

reducible-queryclj

(reducible-query queryable)
(reducible-query connectable queryable)
(reducible-query connectable modelable queryable)

with-call-countcljmacro

(with-call-count [call-count-fn-binding] & body)

Execute body, trackingthe number of database queries and statements executed. This number can be fetched at any time withing body by calling function bound to call-count-fn-binding:

(with-call-count [call-count] (select ...) (println "CALLS:" (call-count)) (insert! ...) (println "CALLS:" (call-count))) ;; -> CALLS: 1 ;; -> CALLS: 2

Execute `body`, trackingthe number of database queries and statements executed. This number can be fetched at any
time withing `body` by calling function bound to `call-count-fn-binding`:

  (with-call-count [call-count]
    (select ...)
    (println "CALLS:" (call-count))
    (insert! ...)
    (println "CALLS:" (call-count)))
  ;; -> CALLS: 1
  ;; -> CALLS: 2
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close