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))