PostgreSQL IN/= ANY(?) test
Hopefully documentation to come!
This commit is contained in:
parent
525350e155
commit
296cd51aa5
3 changed files with 9 additions and 2 deletions
|
|
@ -6,7 +6,7 @@ Only accretive/fixative changes will be made from now on.
|
|||
|
||||
The following changes have been committed to the **master** branch since the 1.0.6 release:
|
||||
|
||||
* None.
|
||||
* Added test for using `any(?)` and arrays in PostgreSQL for `IN (?,,,?)` style queries. Documentation to follow once I figure out where that belongs!
|
||||
|
||||
## Stable Builds
|
||||
|
||||
|
|
|
|||
4
deps.edn
4
deps.edn
|
|
@ -17,7 +17,9 @@
|
|||
com.opentable.components/otj-pg-embedded {:mvn/version "0.13.1"}
|
||||
com.impossibl.pgjdbc-ng/pgjdbc-ng {:mvn/version "0.8.2"}
|
||||
org.xerial/sqlite-jdbc {:mvn/version "3.28.0"}
|
||||
com.microsoft.sqlserver/mssql-jdbc {:mvn/version "7.2.2.jre8"}}}
|
||||
com.microsoft.sqlserver/mssql-jdbc {:mvn/version "7.2.2.jre8"}
|
||||
;; supplementary test stuff
|
||||
org.slf4j/slf4j-nop {:mvn/version "1.7.28"}}}
|
||||
:runner
|
||||
{:extra-deps {com.cognitect/test-runner
|
||||
{:git/url "https://github.com/cognitect-labs/test-runner"
|
||||
|
|
|
|||
|
|
@ -197,3 +197,8 @@
|
|||
(sql/find-by-keys (ds) :fruit
|
||||
{:name "Apple"}
|
||||
{:order-by []}))))
|
||||
|
||||
(deftest array-in
|
||||
(when (postgres?)
|
||||
(let [data (sql/find-by-keys (ds) :fruit ["id = any(?)" (int-array [1 2 3 4])])]
|
||||
(is (= 4 (count data))))))
|
||||
|
|
|
|||
Loading…
Reference in a new issue