Skip to content

Commit

Permalink
add note about tuple list vs batch insert (issue #22)
Browse files Browse the repository at this point in the history
  • Loading branch information
csummers committed Feb 24, 2016
1 parent 5fc2139 commit 371736c
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion docs/hugsql.org/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1298,7 +1298,18 @@ <h5 id="param-tuple-list">SQL Tuple Lists</h5>

<p><em>The use of a tuple list in the above manner is not
supported by all databases. Postgresql, MySQL, H2, Derby, and
SQLite support it. HSQLDB does not support it.</em></p>
SQLite support it. HSQLDB does not support it.</em></p>

<p><em><b>BATCH INSERTS:</b> It should be noted that Tuple List
Parameter support is only support for SQL <code>INSERT...VALUES
(...),(...),(...)</code> syntax. This is appropriate for
small-ish multi-record inserts. However, this is different than
large batch support. The underlying JDBC driver for your
database has a limit to the size of the SQL and the number of
allowed bind parameters. If you are doing large batch inserts,
you should <code>map</code> or <code>doseq</code> over your
HugSQL-generated insert function within
a <a href="#using-transactions">transaction</a>.</em></p>

<h5 id="param-identifier">SQL Identifiers</h5>

Expand Down

0 comments on commit 371736c

Please sign in to comment.