package gojay

import 

// DecodeSQLNullString decodes a sql.NullString
func ( *Decoder) ( *sql.NullString) error {
	if .isPooled == 1 {
		panic(InvalidUsagePooledDecoderError("Invalid usage of pooled decoder"))
	}
	return .decodeSQLNullString()
}

func ( *Decoder) ( *sql.NullString) error {
	var  string
	if  := .decodeString(&);  != nil {
		return 
	}
	.String = 
	.Valid = true
	return nil
}

// DecodeSQLNullInt64 decodes a sql.NullInt64
func ( *Decoder) ( *sql.NullInt64) error {
	if .isPooled == 1 {
		panic(InvalidUsagePooledDecoderError("Invalid usage of pooled decoder"))
	}
	return .decodeSQLNullInt64()
}

func ( *Decoder) ( *sql.NullInt64) error {
	var  int64
	if  := .decodeInt64(&);  != nil {
		return 
	}
	.Int64 = 
	.Valid = true
	return nil
}

// DecodeSQLNullFloat64 decodes a sql.NullString with the given format
func ( *Decoder) ( *sql.NullFloat64) error {
	if .isPooled == 1 {
		panic(InvalidUsagePooledDecoderError("Invalid usage of pooled decoder"))
	}
	return .decodeSQLNullFloat64()
}

func ( *Decoder) ( *sql.NullFloat64) error {
	var  float64
	if  := .decodeFloat64(&);  != nil {
		return 
	}
	.Float64 = 
	.Valid = true
	return nil
}

// DecodeSQLNullBool decodes a sql.NullString with the given format
func ( *Decoder) ( *sql.NullBool) error {
	if .isPooled == 1 {
		panic(InvalidUsagePooledDecoderError("Invalid usage of pooled decoder"))
	}
	return .decodeSQLNullBool()
}

func ( *Decoder) ( *sql.NullBool) error {
	var  bool
	if  := .decodeBool(&);  != nil {
		return 
	}
	.Bool = 
	.Valid = true
	return nil
}

// Add Values functions

// AddSQLNullString decodes the JSON value within an object or an array to qn *sql.NullString
func ( *Decoder) ( *sql.NullString) error {
	return .SQLNullString()
}

// SQLNullString decodes the JSON value within an object or an array to an *sql.NullString
func ( *Decoder) ( *sql.NullString) error {
	var  *string
	if  := .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.NullInt64
func ( *Decoder) ( *sql.NullInt64) error {
	return .SQLNullInt64()
}

// SQLNullInt64 decodes the JSON value within an object or an array to an *sql.NullInt64
func ( *Decoder) ( *sql.NullInt64) error {
	var  *int64
	if  := .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.NullFloat64
func ( *Decoder) ( *sql.NullFloat64) error {
	return .SQLNullFloat64()
}

// SQLNullFloat64 decodes the JSON value within an object or an array to an *sql.NullFloat64
func ( *Decoder) ( *sql.NullFloat64) error {
	var  *float64
	if  := .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.NullBool
func ( *Decoder) ( *sql.NullBool) error {
	return .SQLNullBool()
}

// SQLNullBool decodes the JSON value within an object or an array to an *sql.NullBool
func ( *Decoder) ( *sql.NullBool) error {
	var  *bool
	if  := .BoolNull(&);  != nil {
		return 
	}
	if  == nil {
		.Valid = false
	} else {
		.Bool = *
		.Valid = true
	}
	return nil
}