Browse files

Add note on batch insert behaviour

  • Loading branch information...
1 parent 3a50a33 commit 93a33472440ced5e13bdad94f1c5788f842fd2fc @d6y d6y committed Apr 12, 2016
Showing with 9 additions and 0 deletions.
  1. +9 −0 slick/src/sphinx/queries.rst
@@ -269,6 +269,14 @@ Here is an example of using this feature to return an object with an updated id:
.. includecode:: code/LiftedEmbedding.scala#insert3b
+.. note::
+ When using the ``++=`` batch insert operation, Slick makes use of the JDBC batch API.
+ The underlying JDBC driver will decide how to transmit the batch (via SQL) to the database server.
+ Slick may fall back to generating multiple insert statements for batch operations.
+ This will depend on the driver (if it supports batch insert),
+ and other circumstances (``returning`` keys is generally not supported in batch operations).
Instead of inserting data from the client side you can also insert data
created by a ``Query`` or a scalar expression that is executed in the
database server:
@@ -279,6 +287,7 @@ In these cases, ``AutoInc`` columns are *not* ignored.
.. index:: update, UpdateInvoker, updateStatement

0 comments on commit 93a3347

Please sign in to comment.