MCPcopy Create free account
hub / github.com/francoispqt/gojay / AddSQLNullBoolKeyOmitEmpty

Method AddSQLNullBoolKeyOmitEmpty

encode_sqlnull.go:325–329  ·  view source on GitHub ↗

AddSQLNullBoolKeyOmitEmpty 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.NullBool)

Source from the content-addressed store, hash-verified

323// AddSQLNullBoolKeyOmitEmpty adds a string to be encoded or skips it if it is zero value.
324// Must be used inside an object as it will encode a key
325func (enc *Encoder) AddSQLNullBoolKeyOmitEmpty(key string, v *sql.NullBool) {
326 if v != nil && v.Valid && v.Bool != false {
327 enc.BoolKeyOmitEmpty(key, v.Bool)
328 }
329}
330
331// AddSQLNullBoolKeyNullEmpty adds a string to be encoded or skips it if it is zero value.
332// Must be used inside an object as it will encode a key

Callers 1

TestAddSQLNullBoolKeyFunction · 0.95

Calls 1

BoolKeyOmitEmptyMethod · 0.95

Tested by 1

TestAddSQLNullBoolKeyFunction · 0.76