Fixes #132 by adding specs

This commit is contained in:
Sean Corfield 2020-07-10 12:36:32 -07:00
parent 0d2d2c78cd
commit 9501d9293c
2 changed files with 12 additions and 5 deletions

View file

@ -3,6 +3,7 @@
Only accretive/fixative changes will be made from now on. Only accretive/fixative changes will be made from now on.
Changes made on **develop** since the 1.1.547 release: Changes made on **develop** since the 1.1.547 release:
* Fix #132 by adding specs for `next.jdbc/with-options` and `next.jdbc.prepare/statement`; correct spec for `next.jdbc.connection/component`. PR #131 from @Briaoeuidhtns.
* Fix #130 by implementing `clojure.lang.ILookup` on the three builder adapters. * Fix #130 by implementing `clojure.lang.ILookup` on the three builder adapters.
* Fix #129 by adding `with-column-value` to `RowBuilder` and a more generic `builder-adapter`. * Fix #129 by adding `with-column-value` to `RowBuilder` and a more generic `builder-adapter`.
* Fix #128 by adding a test for the "not found" arity of lookup on mapified result sets. * Fix #128 by adding a test for the "not found" arity of lookup on mapified result sets.

View file

@ -110,10 +110,6 @@
:sql-params ::sql-params :sql-params ::sql-params
:opts (s/? ::opts-map))) :opts (s/? ::opts-map)))
(s/fdef jdbc/statement
:args (s/cat :connection ::connection
:opts (s/? ::opts-map)))
(s/fdef jdbc/plan (s/fdef jdbc/plan
:args (s/alt :prepared (s/cat :stmt ::statement) :args (s/alt :prepared (s/cat :stmt ::statement)
:sql (s/cat :connectable ::connectable :sql (s/cat :connectable ::connectable
@ -137,6 +133,10 @@
:f fn? :f fn?
:opts (s/? ::opts-map))) :opts (s/? ::opts-map)))
(s/fdef jdbc/with-options
:args (s/cat :connectable ::connectable
:opts ::opts-map))
(s/fdef jdbc/with-transaction (s/fdef jdbc/with-transaction
:args (s/cat :binding (s/and vector? :args (s/cat :binding (s/and vector?
(s/cat :sym simple-symbol? (s/cat :sym simple-symbol?
@ -151,7 +151,7 @@
(s/fdef connection/component (s/fdef connection/component
:args (s/cat :clazz #(instance? Class %) :args (s/cat :clazz #(instance? Class %)
:db-spec ::db-spec-or-jdbc :db-spec ::db-spec-or-jdbc
:close-fn (s/? ifn?))) :close-fn (s/? fn?)))
(s/fdef prepare/execute-batch! (s/fdef prepare/execute-batch!
:args (s/cat :ps ::prepared-statement :args (s/cat :ps ::prepared-statement
@ -162,6 +162,10 @@
:args (s/cat :ps ::prepared-statement :args (s/cat :ps ::prepared-statement
:params ::params)) :params ::params))
(s/fdef prepare/statement
:args (s/cat :connection ::connection
:opts (s/? ::opts-map)))
(s/fdef sql/insert! (s/fdef sql/insert!
:args (s/cat :connectable ::connectable :args (s/cat :connectable ::connectable
:table keyword? :table keyword?
@ -228,7 +232,9 @@
`jdbc/execute-one! `jdbc/execute-one!
`jdbc/transact `jdbc/transact
`jdbc/with-transaction `jdbc/with-transaction
`jdbc/with-options
`connection/->pool `connection/->pool
`connection/component
`prepare/execute-batch! `prepare/execute-batch!
`prepare/set-parameters `prepare/set-parameters
`prepare/statement `prepare/statement