summaryrefslogtreecommitdiff
path: root/src/clojure_sql/query.clj
blob: 218ae7a18baad77cb341c582fc693197db286c31 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
(ns clojure-sql.query)

(def ^:private ^:dynamic *query-deref-behaviour* identity)
(defn set-query-deref-behaviour! [f]
  (alter-var-root #'*query-deref-behaviour* (constantly f))
  nil)

(defrecord ^:private Query []
  clojure.lang.IDeref
  (deref [this] (*query-deref-behaviour* this)))

(def query? (partial instance? Query))