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

Method SQLNullBoolKeyOmitEmpty

encode_sqlnull.go:365–369  ·  view source on GitHub ↗

SQLNullBoolKeyOmitEmpty 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

363// SQLNullBoolKeyOmitEmpty adds a string to be encoded or skips it if it is zero value.
364// Must be used inside an object as it will encode a key
365func (enc *Encoder) SQLNullBoolKeyOmitEmpty(key string, v *sql.NullBool) {
366 if v != nil && v.Valid && v.Bool != false {
367 enc.BoolKeyOmitEmpty(key, v.Bool)
368 }
369}
370
371// SQLNullBoolKeyNullEmpty adds a string to be encoded or skips it if it is zero value.
372// 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