How can I implement select * from fruit where cost > 22 and cost < 44 w/ DSL way, by example below from clojure/java.jdbc demo:
(require '[clojure.java.jdbc :as j]
'[clojure.java.jdbc.sql :as s])
(def mysql-db {:subprotocol "mysql"
:subname "//127.0.0.1:3306/clojure_test"
:user "clojure_test"
:password "clojure_test"})
(j/insert! mysql-db :fruit
{:name "Apple" :appearance "rosy" :cost 24}
{:name "Orange" :appearance "round" :cost 49})
;; ({:generated_key 1} {:generated_key 2})
(j/query mysql-db
(s/select * :fruit (s/where {:appearance "rosy"}))
:row-fn :cost)
;; (24)
Thanks in advance.