Changeset 0.24.2 (#158)
This commit is contained in:
@@ -44,6 +44,13 @@ func (b *UpdateBuilder) Set(col string, val interface{}) *UpdateBuilder {
|
||||
return b
|
||||
}
|
||||
|
||||
// SetNull adds a col = NULL pair to the UPDATE.
|
||||
func (b *UpdateBuilder) SetNull(col string) *UpdateBuilder {
|
||||
b.argIdx++
|
||||
b.sets = append(b.sets, fmt.Sprintf("%s = NULL", col))
|
||||
return b
|
||||
}
|
||||
|
||||
// SetJSON adds a JSONB column from a map.
|
||||
func (b *UpdateBuilder) SetJSON(col string, val interface{}) *UpdateBuilder {
|
||||
data, err := json.Marshal(val)
|
||||
|
||||
Reference in New Issue
Block a user