dialect/sql: add Add method to UpdateSet

This commit is contained in:
Ariel Mashraki
2021-09-16 23:19:24 +03:00
committed by Ariel Mashraki
parent 3c650e507e
commit 912415e1e1
2 changed files with 12 additions and 4 deletions

View File

@@ -934,6 +934,12 @@ func (u *UpdateSet) Set(column string, v interface{}) *UpdateSet {
return u
}
// Add adds a numeric value to the given column.
func (u *UpdateSet) Add(column string, v interface{}) *UpdateSet {
u.update.Add(column, v)
return u
}
// SetNull sets a column as null value.
func (u *UpdateSet) SetNull(column string) *UpdateSet {
u.update.SetNull(column)