More stmt-sql bug fixing
This commit is contained in:
parent
eb5bfef585
commit
d6693a9032
1 changed files with 4 additions and 2 deletions
|
|
@ -870,7 +870,8 @@
|
||||||
(-execute-one [this sql-params opts]
|
(-execute-one [this sql-params opts]
|
||||||
(assert (= 1 (count sql-params))
|
(assert (= 1 (count sql-params))
|
||||||
"Parameters cannot be provided when executing a non-prepared Statement")
|
"Parameters cannot be provided when executing a non-prepared Statement")
|
||||||
(if-let [rs (stmt-sql->result-set this (first sql-params))]
|
(if-let [rs (stmt-sql->result-set this (first sql-params)
|
||||||
|
(assoc opts :return-keys true))]
|
||||||
(let [builder-fn (get opts :builder-fn as-maps)
|
(let [builder-fn (get opts :builder-fn as-maps)
|
||||||
builder (builder-fn rs opts)]
|
builder (builder-fn rs opts)]
|
||||||
(when (.next rs)
|
(when (.next rs)
|
||||||
|
|
@ -886,7 +887,8 @@
|
||||||
(.getConnection this) this go (assoc opts :return-keys true))]
|
(.getConnection this) this go (assoc opts :return-keys true))]
|
||||||
(recur (.getMoreResults this) (conj acc rs))
|
(recur (.getMoreResults this) (conj acc rs))
|
||||||
acc))
|
acc))
|
||||||
(if-let [rs (stmt-sql->result-set this (first sql-params))]
|
(if-let [rs (stmt-sql->result-set this (first sql-params)
|
||||||
|
(assoc opts :return-keys true))]
|
||||||
(datafiable-result-set rs (.getConnection this) opts)
|
(datafiable-result-set rs (.getConnection this) opts)
|
||||||
[{:next.jdbc/update-count (.getUpdateCount this)}])))
|
[{:next.jdbc/update-count (.getUpdateCount this)}])))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue