Updated insert-multi! docstring
Removed caveat about batching (doesn't apply) but added caveat about size/parameter limits.
This commit is contained in:
parent
dcb632d7cf
commit
58aeff56f7
1 changed files with 13 additions and 4 deletions
|
|
@ -192,10 +192,10 @@
|
||||||
multiple rows in the database and attempts to return a vector of maps of
|
multiple rows in the database and attempts to return a vector of maps of
|
||||||
generated keys.
|
generated keys.
|
||||||
|
|
||||||
Note: some database drivers need to be told to rewrite the SQL for this to
|
Note: this expands to a single SQL statement with placeholders for every
|
||||||
be performed as a single, batched operation. In particular, PostgreSQL
|
value being inserted -- for large sets of rows, this may exceed the limits
|
||||||
requires the `:reWriteBatchedInserts true` option and MySQL requires
|
on SQL string size and/or number of parameters for your JDBC driver or your
|
||||||
`:rewriteBatchedStatement true` (both non-standard JDBC options, of course!)."
|
database!"
|
||||||
([connectable table cols rows]
|
([connectable table cols rows]
|
||||||
(insert-multi! connectable table cols rows {}))
|
(insert-multi! connectable table cols rows {}))
|
||||||
([connectable table cols rows opts]
|
([connectable table cols rows opts]
|
||||||
|
|
@ -203,6 +203,15 @@
|
||||||
(for-insert-multi table cols rows opts)
|
(for-insert-multi table cols rows opts)
|
||||||
(merge {:return-keys true} opts))))
|
(merge {:return-keys true} opts))))
|
||||||
|
|
||||||
|
(comment
|
||||||
|
;; removed this caveat from insert-multi! because it doesn't apply --
|
||||||
|
;; these DB-specific options are only needed when you have batched
|
||||||
|
;; parameters and the driver needs a "hint" to perform an actual batch op!
|
||||||
|
"Note: some database drivers need to be told to rewrite the SQL for this to
|
||||||
|
be performed as a single, batched operation. In particular, PostgreSQL
|
||||||
|
requires the `:reWriteBatchedInserts true` option and MySQL requires
|
||||||
|
`:rewriteBatchedStatement true` (both non-standard JDBC options, of course!).")
|
||||||
|
|
||||||
(defn query
|
(defn query
|
||||||
"Syntactic sugar over `execute!` to provide a query alias.
|
"Syntactic sugar over `execute!` to provide a query alias.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue