Allow maps/vectors not to be read as subqueries
This commit is contained in:
parent
48c501d2c4
commit
d74f2d2437
1 changed files with 8 additions and 1 deletions
|
|
@ -261,6 +261,13 @@
|
|||
(defprotocol ToSql
|
||||
(-to-sql [x]))
|
||||
|
||||
(defrecord Value [v]
|
||||
ToSql
|
||||
(-to-sql [_]
|
||||
(add-anon-param v)))
|
||||
|
||||
(defn value [x] (Value. x))
|
||||
|
||||
(declare -format-clause)
|
||||
|
||||
(extend-protocol ToSql
|
||||
|
|
@ -315,7 +322,7 @@
|
|||
nil
|
||||
(-to-sql [x] "NULL")
|
||||
SqlParam
|
||||
(-to-seql [x]
|
||||
(-to-sql [x]
|
||||
(let [pname (param-name x)]
|
||||
(if (map? @*input-params*)
|
||||
(add-param pname (get @*input-params* pname))
|
||||
|
|
|
|||
Loading…
Reference in a new issue