Add RETURNING to Delete statement.

Add DELETE statement wiki page.
This commit is contained in:
go-jet 2019-06-30 17:16:00 +02:00
parent 3d38946eda
commit 5e0e2f2908
10 changed files with 189 additions and 37 deletions

View file

@ -9,7 +9,9 @@ Following clauses are supported:
- MODEL(model) - list of values for columns will be extracted from model object
- MODELS([]model) - list of values for columns will be extracted from list of model objects
- QUERY(select) - select statement that supplies the rows to be inserted.
- RETURNING(columns...) - list of columns to return as statement result
- RETURNING(output_expression...) - An expressions to be computed and returned by the INSERT statement after each row is inserted.
The expressions can use any column names of the table. Write _TableName_.AllColumns to return all columns.
_This list might be extended with feature Jet releases._
@ -124,7 +126,7 @@ err := insertStmt.Query(db, &dest)
Use `ExecContext` and `QueryContext` to provide context object to execution.
Insert example SQL table:
##### SQL table used for the example:
```sql
CREATE TABLE IF NOT EXISTS link (
id serial PRIMARY KEY,