Inserts value and returns the row the table now holds (with its defaults and generated
columns). Fields with a database default (@pg_default) or a generated value
(@pg_generated) are left to the database.
- db: a connection or pool.
- value: the row to insert.
- call: the code of the call, which lets the query text be checked while compiling. Leave the default.
insert :: (db: $D, value: $T, $call := #caller_code) -> (T, Pg_Error)
Inserts value and returns the row the table now holds (with its defaults and generated
columns). Fields with a database default (@pg_default) or a generated value
(@pg_generated) are left to the database.
Parameters
- db: $D
- a connection or pool.
- value: $T
- the row to insert.
- $call := #caller_code
- the code of the call, which lets the query text be checked while compiling. Leave the default.
Returns
- T