diff --git a/CHANGELOG.md b/CHANGELOG.md index 81746c4..f2c3416 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/deps.edn b/deps.edn index 6cb2777..9df249c 100644 --- a/deps.edn +++ b/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" diff --git a/test/next/jdbc/sql_test.clj b/test/next/jdbc/sql_test.clj index d346e66..4c916ed 100644 --- a/test/next/jdbc/sql_test.clj +++ b/test/next/jdbc/sql_test.clj @@ -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))))))