only throw for named param #396
This commit is contained in:
parent
270b9439c8
commit
5e847cde0e
1 changed files with 4 additions and 1 deletions
|
|
@ -1098,7 +1098,10 @@
|
||||||
(let [[sql-x & params-x] (format-expr x {:nested true})
|
(let [[sql-x & params-x] (format-expr x {:nested true})
|
||||||
[sql-y & params-y] (format-expr y {:nested true})
|
[sql-y & params-y] (format-expr y {:nested true})
|
||||||
values (unwrap (first params-y) {})]
|
values (unwrap (first params-y) {})]
|
||||||
(when *caching*
|
;; #396: prevent caching IN () when named parameter is used:
|
||||||
|
(when (and (meta (first params-y))
|
||||||
|
(::wrapper (meta (first params-y)))
|
||||||
|
*caching*)
|
||||||
(throw (ex-info "SQL that includes IN () expressions cannot be cached" {})))
|
(throw (ex-info "SQL that includes IN () expressions cannot be cached" {})))
|
||||||
(when-not (= :none *checking*)
|
(when-not (= :none *checking*)
|
||||||
(when (or (and (sequential? y) (empty? y))
|
(when (or (and (sequential? y) (empty? y))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue