Execute a multi-row INSERT, UPDATE, or other SQL query that is not
expected to return results.
Returns the number of rows affected. If the list of parameters is empty,
this function will simply return 0 without issuing the query to the backend.
If this is not desired, consider using the Values constructor instead.
Throws FormatError if the query could not be formatted correctly, or
a SqlError exception if the backend returns an error.
For example, here's a command that inserts two rows into a table
with two columns:
Execute INSERT ... RETURNING, UPDATE ... RETURNING, or other SQL
query that accepts multi-row input and is expected to return results.
Note that it is possible to write
query conn "INSERT ... RETURNING ..." ...
in cases where you are only inserting a single row, and do not need
functionality analogous to executeMany.
If the list of parameters is empty, this function will simply return []
without issuing the query to the backend. If this is not desired,
consider using the Values constructor instead.
Throws FormatError if the query could not be formatted correctly.
A abort is a similar to rollback but calls ROLLBACK to abort the
transaction. aborts is global. It affects everything before and after
it is called. Duplicate aborts do nothing.
Calling abort throws an Abort exception that is not caught
by the transaction running functions. If you call abort you need to
also be prepared to handle the Abort exception.