Skip to content

v1.27.0

Choose a tag to compare

@smeets smeets released this 12 Jan 12:12
· 87 commits to master since this release
  • Add support for encoding & decoding string-equivalent types to spanner.NullString
type MyEnum string

type api struct {
   Choice *MyEnum
}

type db struct {
    Choice spanner.NullString
}

// encoding
// if api.Choice == nil, db.Choice is empty value ("invalid" aka null) NullString
// if api.Choice != nil, db.Choice is MyEnum converted to string

// decoding
// if db.Choice.Valid, api.Choice is non-nil
// if !db.Choice.Valid, api.Choice is nil

Full Changelog: v1.26.0...v1.27.0