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

Method AddSQLNullInt64KeyOmitEmpty

encode_sqlnull.go:137–141  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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
137func (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

Callers 1

TestAddSQLNullInt64KeyFunction · 0.95

Calls 1

Int64KeyOmitEmptyMethod · 0.95

Tested by 1

TestAddSQLNullInt64KeyFunction · 0.76