Nullable types for Go. All types implement:
sql.Scanner
driver.Valuer
json.Marshaler
json.Unmarshaler
encoding.TextMarshaler
encoding.TextUnmarshaler
xml.Marshaler
xml.Unmarshaler
When marshaling xml, the attribute xsi:nil="true"
will be added for null values.
When unmarshaling xml, the value will be null if xsi:nil="true"
is set.
null.Float64
is based on sql.NullFloat64
and exports the fields Float64
and Valid
.
Valid
is true if Float64
is not null.
null.Int64
is based on sql.NullInt64
and exports the fields Int64
and Valid
.
Valid
is true if Int64
is not null.
null.String
is based on sql.NullString
and exports the fields String
and Valid
.
Valid
is true if String
is not null.
When using encoding.TextUnmarshaler
, an empty text will be valid.