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

Method EncodeSQLNullFloat64

encode_sqlnull.go:194–205  ·  view source on GitHub ↗

NullFloat64 EncodeSQLNullFloat64 encodes a string to

(v *sql.NullFloat64)

Source from the content-addressed store, hash-verified

192
193// EncodeSQLNullFloat64 encodes a string to
194func (enc *Encoder) EncodeSQLNullFloat64(v *sql.NullFloat64) error {
195 if enc.isPooled == 1 {
196 panic(InvalidUsagePooledEncoderError("Invalid usage of pooled encoder"))
197 }
198 _, _ = enc.encodeFloat(v.Float64)
199 _, err := enc.Write()
200 if err != nil {
201 enc.err = err
202 return err
203 }
204 return nil
205}
206
207// AddSQLNullFloat64 adds a string to be encoded, must be used inside a slice or array encoding (does not encode a key)
208func (enc *Encoder) AddSQLNullFloat64(v *sql.NullFloat64) {

Callers 1

TestEncoceSQLNullFloat64Function · 0.95

Calls 3

encodeFloatMethod · 0.95
WriteMethod · 0.95

Tested by 1

TestEncoceSQLNullFloat64Function · 0.76