Add RETURNING to Delete statement.
Add DELETE statement wiki page.
This commit is contained in:
parent
3d38946eda
commit
5e0e2f2908
10 changed files with 189 additions and 37 deletions
|
|
@ -15,3 +15,11 @@ DELETE FROM db.table1
|
|||
WHERE table1.col1 = $1;
|
||||
`, int64(1))
|
||||
}
|
||||
|
||||
func TestDeleteWithWhereAndReturning(t *testing.T) {
|
||||
assertStatement(t, table1.DELETE().WHERE(table1Col1.EQ(Int(1))).RETURNING(table1Col1), `
|
||||
DELETE FROM db.table1
|
||||
WHERE table1.col1 = $1
|
||||
RETURNING table1.col1 AS "table1.col1";
|
||||
`, int64(1))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue