Update updates the model omitting fields with zero values such as: - empty string, - 0, - zero time, - empty map or slice, - byte array with all zeroes, - nil ptr, - types with method `IsZero() == true`.
(scan ...interface{})
| 1132 | // - nil ptr, |
| 1133 | // - types with method `IsZero() == true`. |
| 1134 | func (q *Query) UpdateNotZero(scan ...interface{}) (Result, error) { |
| 1135 | return q.update(scan, true) |
| 1136 | } |
| 1137 | |
| 1138 | func (q *Query) update(values []interface{}, omitZero bool) (Result, error) { |
| 1139 | if q.stickyErr != nil { |