Inserts each value in turn (one statement each), stopping at the first error. Returns the rows inserted so far, from context.allocator.
- db: a connection or pool.
- values: the rows to insert.
- call: the code of the call, which lets the query text be checked while compiling. Leave the default.
insert_many :: (
db: $D,
values: [] $T,
$call := #caller_code
) -> ([] T, Pg_Error)
Inserts each value in turn (one statement each), stopping at the first error. Returns the rows inserted so far, from context.allocator.
Parameters
- db: $D
- a connection or pool.
- values: [] $T
- the rows to insert.
- $call := #caller_code
- the code of the call, which lets the query text be checked while compiling. Leave the default.
Returns
- [] T