Skip to content
A collection of null types for the sql package
Branch: master
Clone or download
markbates Merge pull request #1 from gobuffalo/azure
set up release and azure
Latest commit 85f3c92 Mar 5, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore set up release and azure Mar 3, 2019
.gometalinter.json set up release and azure Mar 3, 2019
LICENSE set up release and azure Mar 3, 2019
Makefile set up release and azure Mar 3, 2019
README.md Extract nulls from pop repo Mar 2, 2019
azure-pipelines.yml
azure-tests.yml
bool.go Extract nulls from pop repo Mar 2, 2019
byte_slice.go Extract nulls from pop repo Mar 2, 2019
float32.go Extract nulls from pop repo Mar 2, 2019
float64.go Extract nulls from pop repo Mar 2, 2019
go.mod Update go.mod Mar 3, 2019
go.sum deps Mar 3, 2019
int.go Extract nulls from pop repo Mar 2, 2019
int32.go Extract nulls from pop repo Mar 2, 2019
int64.go Extract nulls from pop repo Mar 2, 2019
int_test.go
nulls.go Extract nulls from pop repo Mar 2, 2019
schema.go Extract nulls from pop repo Mar 2, 2019
string.go Extract nulls from pop repo Mar 2, 2019
time.go Extract nulls from pop repo Mar 2, 2019
types_test.go Extract nulls from pop repo Mar 2, 2019
uint32.go
uuid.go Extract nulls from pop repo Mar 2, 2019
uuid_test.go Extract nulls from pop repo Mar 2, 2019
version.go set up release and azure Mar 3, 2019

README.md

github.com/gobuffalo/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/gobuffalo/nulls

Supported Datatypes

  • string (nulls.String) - Replaces sql.NullString
  • int64 (nulls.Int64) - Replaces sql.NullInt64
  • float64 (nulls.Float64) - Replaces sql.NullFloat64
  • bool (nulls.Bool) - Replaces sql.NullBool
  • []byte (nulls.ByteSlice)
  • float32 (nulls.Float32)
  • int (nulls.Int)
  • int32 (nulls.Int32)
  • uint32 (nulls.UInt32)
  • time.Time (nulls.Time)
You can’t perform that action at this time.