diff --git a/src/next/jdbc/sql.clj b/src/next/jdbc/sql.clj index 2453ee4..71bbc40 100644 --- a/src/next/jdbc/sql.clj +++ b/src/next/jdbc/sql.clj @@ -192,10 +192,10 @@ multiple rows in the database and attempts to return a vector of maps of generated keys. - 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!)." + Note: this expands to a single SQL statement with placeholders for every + value being inserted -- for large sets of rows, this may exceed the limits + on SQL string size and/or number of parameters for your JDBC driver or your + database!" ([connectable table cols rows] (insert-multi! connectable table cols rows {})) ([connectable table cols rows opts] @@ -203,6 +203,15 @@ (for-insert-multi table cols rows 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 "Syntactic sugar over `execute!` to provide a query alias.