NullBool EncodeSQLNullBool encodes a string to
(v *sql.NullBool)
| 290 | |
| 291 | // EncodeSQLNullBool encodes a string to |
| 292 | func (enc *Encoder) EncodeSQLNullBool(v *sql.NullBool) error { |
| 293 | if enc.isPooled == 1 { |
| 294 | panic(InvalidUsagePooledEncoderError("Invalid usage of pooled encoder")) |
| 295 | } |
| 296 | _, _ = enc.encodeBool(v.Bool) |
| 297 | _, err := enc.Write() |
| 298 | if err != nil { |
| 299 | enc.err = err |
| 300 | return err |
| 301 | } |
| 302 | return nil |
| 303 | } |
| 304 | |
| 305 | // AddSQLNullBool adds a string to be encoded, must be used inside a slice or array encoding (does not encode a key) |
| 306 | func (enc *Encoder) AddSQLNullBool(v *sql.NullBool) { |