Add a quick'n'dirty query function
For benchmarking overhead.
This commit is contained in:
parent
4ae5b44a52
commit
fc1ca82e4e
1 changed files with 5 additions and 0 deletions
|
|
@ -410,6 +410,11 @@
|
||||||
(with-open [stmt (prepare con sql-params opts)]
|
(with-open [stmt (prepare con sql-params opts)]
|
||||||
(reduce-stmt stmt f init))))))))
|
(reduce-stmt stmt f init))))))))
|
||||||
|
|
||||||
|
(defn query
|
||||||
|
""
|
||||||
|
[connectable sql-params & [opts]]
|
||||||
|
(into [] (map (partial into {})) (execute! connectable sql-params opts)))
|
||||||
|
|
||||||
(comment
|
(comment
|
||||||
(def db-spec {:dbtype "h2:mem" :dbname "perf"})
|
(def db-spec {:dbtype "h2:mem" :dbname "perf"})
|
||||||
(def con db-spec)
|
(def con db-spec)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue