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
|
|
@ -118,19 +118,23 @@ func (u *updateStatementImpl) Sql() (sql string, args []interface{}, err error)
|
|||
return
|
||||
}
|
||||
|
||||
if len(u.returning) > 0 {
|
||||
out.newLine()
|
||||
out.writeString("RETURNING")
|
||||
out.increaseIdent()
|
||||
out.increaseIdent()
|
||||
|
||||
err = serializeProjectionList(update_statement, u.returning, out)
|
||||
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
if err = out.writeReturning(update_statement, u.returning); err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
//if len(u.returning) > 0 {
|
||||
// out.newLine()
|
||||
// out.writeString("RETURNING")
|
||||
// out.increaseIdent()
|
||||
// out.increaseIdent()
|
||||
//
|
||||
// err = serializeProjectionList(update_statement, u.returning, out)
|
||||
//
|
||||
// if err != nil {
|
||||
// return
|
||||
// }
|
||||
//}
|
||||
|
||||
sql, args = out.finalize()
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue