Source File
decode_sqlnull.go
Belonging Package
github.com/francoispqt/gojay
package gojayimport// DecodeSQLNullString decodes a sql.NullStringfunc ( *Decoder) ( *sql.NullString) error {if .isPooled == 1 {panic(InvalidUsagePooledDecoderError("Invalid usage of pooled decoder"))}return .decodeSQLNullString()}func ( *Decoder) ( *sql.NullString) error {var stringif := .decodeString(&); != nil {return}.String =.Valid = truereturn nil}// DecodeSQLNullInt64 decodes a sql.NullInt64func ( *Decoder) ( *sql.NullInt64) error {if .isPooled == 1 {panic(InvalidUsagePooledDecoderError("Invalid usage of pooled decoder"))}return .decodeSQLNullInt64()}func ( *Decoder) ( *sql.NullInt64) error {var int64if := .decodeInt64(&); != nil {return}.Int64 =.Valid = truereturn nil}// DecodeSQLNullFloat64 decodes a sql.NullString with the given formatfunc ( *Decoder) ( *sql.NullFloat64) error {if .isPooled == 1 {panic(InvalidUsagePooledDecoderError("Invalid usage of pooled decoder"))}return .decodeSQLNullFloat64()}func ( *Decoder) ( *sql.NullFloat64) error {var float64if := .decodeFloat64(&); != nil {return}.Float64 =.Valid = truereturn nil}// DecodeSQLNullBool decodes a sql.NullString with the given formatfunc ( *Decoder) ( *sql.NullBool) error {if .isPooled == 1 {panic(InvalidUsagePooledDecoderError("Invalid usage of pooled decoder"))}return .decodeSQLNullBool()}func ( *Decoder) ( *sql.NullBool) error {var boolif := .decodeBool(&); != nil {return}.Bool =.Valid = truereturn nil}// Add Values functions// AddSQLNullString decodes the JSON value within an object or an array to qn *sql.NullStringfunc ( *Decoder) ( *sql.NullString) error {return .SQLNullString()}// SQLNullString decodes the JSON value within an object or an array to an *sql.NullStringfunc ( *Decoder) ( *sql.NullString) error {var *stringif := .StringNull(&); != nil {return}if == nil {.Valid = false} else {.String = *.Valid = true}return nil}// AddSQLNullInt64 decodes the JSON value within an object or an array to qn *sql.NullInt64func ( *Decoder) ( *sql.NullInt64) error {return .SQLNullInt64()}// SQLNullInt64 decodes the JSON value within an object or an array to an *sql.NullInt64func ( *Decoder) ( *sql.NullInt64) error {var *int64if := .Int64Null(&); != nil {return}if == nil {.Valid = false} else {.Int64 = *.Valid = true}return nil}// AddSQLNullFloat64 decodes the JSON value within an object or an array to qn *sql.NullFloat64func ( *Decoder) ( *sql.NullFloat64) error {return .SQLNullFloat64()}// SQLNullFloat64 decodes the JSON value within an object or an array to an *sql.NullFloat64func ( *Decoder) ( *sql.NullFloat64) error {var *float64if := .Float64Null(&); != nil {return}if == nil {.Valid = false} else {.Float64 = *.Valid = true}return nil}// AddSQLNullBool decodes the JSON value within an object or an array to an *sql.NullBoolfunc ( *Decoder) ( *sql.NullBool) error {return .SQLNullBool()}// SQLNullBool decodes the JSON value within an object or an array to an *sql.NullBoolfunc ( *Decoder) ( *sql.NullBool) error {var *boolif := .BoolNull(&); != nil {return}if == nil {.Valid = false} else {.Bool = *.Valid = true}return nil}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |