AddSQLNullInt64KeyOmitEmpty adds a string to be encoded or skips it if it is zero value. Must be used inside an object as it will encode a key
(key string, v *sql.NullInt64)
| 135 | // AddSQLNullInt64KeyOmitEmpty adds a string to be encoded or skips it if it is zero value. |
| 136 | // Must be used inside an object as it will encode a key |
| 137 | func (enc *Encoder) AddSQLNullInt64KeyOmitEmpty(key string, v *sql.NullInt64) { |
| 138 | if v != nil && v.Valid && v.Int64 != 0 { |
| 139 | enc.Int64KeyOmitEmpty(key, v.Int64) |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | // AddSQLNullInt64KeyNullEmpty adds a string to be encoded or skips it if it is zero value. |
| 144 | // Must be used inside an object as it will encode a key |