Adds a returning *
or returning table.*
to an insert/update/delete/merge
query on databases that support returning
such as PostgreSQL.
Also see the returning method.
Adds a returning *
to an insert/update/delete/merge query on databases
that support returning
such as PostgreSQL.
Also see the returning method.
Allows you to return data from modified rows.
On supported databases like PostgreSQL, this method can be chained to
insert
,update
,delete
andmerge
queries to return data.Note that on SQLite you need to give aliases for the expressions to avoid this bug in SQLite. For example
.returning('id as id')
.Also see the returningAll method.
Examples
Return one column:
Return multiple columns:
Return arbitrary expressions: