Add UPDATE statement wiki page.

This commit is contained in:
go-jet 2019-06-30 13:42:01 +02:00
parent 5f678a7e82
commit 3d38946eda
4 changed files with 124 additions and 18 deletions

View file

@ -11,7 +11,7 @@ type UpdateStatement interface {
Statement
SET(value interface{}, values ...interface{}) UpdateStatement
USING(data interface{}) UpdateStatement
MODEL(data interface{}) UpdateStatement
WHERE(expression BoolExpression) UpdateStatement
RETURNING(projections ...projection) UpdateStatement
@ -39,8 +39,8 @@ func (u *updateStatementImpl) SET(value interface{}, values ...interface{}) Upda
return u
}
func (u *updateStatementImpl) USING(modelData interface{}) UpdateStatement {
u.row = unwindRowFromModel(u.columns, modelData)
func (u *updateStatementImpl) MODEL(data interface{}) UpdateStatement {
u.row = unwindRowFromModel(u.columns, data)
return u
}