package
0.0.0-20150312093914-dc4534b9e90c
Repository: https://github.com/danielheckrath/going.git
Documentation: pkg.go.dev
# README
github.com/markbates/going/nulls
This package should be used in place of the built-in null types in the sql
package.
The real benefit of this packages comes in its implementation of MarshalJSON
and UnmarshalJSON
to properly encode/decode null
values.
Installation
$ go get github.com/markbates/going/nulls
Supported Datatypes
string
(nulls.NullString
) - Replacessql.NullString
int64
(nulls.NullInt64
) - Replacessql.NullInt64
float64
(nulls.NullFloat64
) - Replacessql.NullFloat64
bool
(nulls.NullBool
) - Replacessql.NullBool
[]byte
(nulls.NullByteSlice
)float32
(nulls.NullFloat32
)int
(nulls.NullInt
)int32
(nulls.NullInt32
)uint32
(nulls.NullUInt32
)
Additionally this package provides the following extra data types:
time.Time
(nulls.NullTime
)