AddSQLNullFloat64KeyOmitEmpty 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.NullFloat64)
| 233 | // AddSQLNullFloat64KeyOmitEmpty adds a string to be encoded or skips it if it is zero value. |
| 234 | // Must be used inside an object as it will encode a key |
| 235 | func (enc *Encoder) AddSQLNullFloat64KeyOmitEmpty(key string, v *sql.NullFloat64) { |
| 236 | if v != nil && v.Valid && v.Float64 != 0 { |
| 237 | enc.Float64KeyOmitEmpty(key, v.Float64) |
| 238 | } |
| 239 | } |
| 240 | |
| 241 | // AddSQLNullFloat64KeyNullEmpty adds a string to be encoded or skips it if it is zero value. |
| 242 | // Must be used inside an object as it will encode a key |