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

Method SQLNullFloat64

decode_sqlnull.go:125–137  ·  view source on GitHub ↗

SQLNullFloat64 decodes the JSON value within an object or an array to an *sql.NullFloat64

(v *sql.NullFloat64)

Source from the content-addressed store, hash-verified

123
124// SQLNullFloat64 decodes the JSON value within an object or an array to an *sql.NullFloat64
125func (dec *Decoder) SQLNullFloat64(v *sql.NullFloat64) error {
126 var b *float64
127 if err := dec.Float64Null(&b); err != nil {
128 return err
129 }
130 if b == nil {
131 v.Valid = false
132 } else {
133 v.Float64 = *b
134 v.Valid = true
135 }
136 return nil
137}
138
139// AddSQLNullBool decodes the JSON value within an object or an array to an *sql.NullBool
140func (dec *Decoder) AddSQLNullBool(v *sql.NullBool) error {

Callers 1

AddSQLNullFloat64Method · 0.95

Calls 1

Float64NullMethod · 0.95

Tested by

no test coverage detected