krisajenkins/yesql — pull request #11 by sgrimm (2014-02-25 07:40:45+00:00)
Title: Add optional hardwired dbspec to query generation

For a single-database application, passing dbspec parameters around is
just code clutter. This change allows an optional map to be passed as an
extra parameter to defquery and defqueries. If it contains a key
:db-spec, the value will be used as the connection specifier for all the
generated JDBC calls, and the generated functions will not take it as an
initial parameter. So the following two snippets are equivalent:

(defquery myquery "xyz.sql")
(myquery db-spec 1 2 3 4)

(defquery myquery "xyz.sql" {:db-spec db-spec})
(myquery 1 2 3 4)