Skip to content

Commit

Permalink
feat(spanner): support NUMERIC in mutations (#3328)
Browse files Browse the repository at this point in the history
Co-authored-by: Knut Olav Løite <koloite@gmail.com>
Co-authored-by: skuruppu <skuruppu@google.com>
  • Loading branch information
3 people committed Dec 10, 2020
1 parent 2cf4433 commit fa90737
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spanner/mutation.go
Expand Up @@ -119,6 +119,8 @@ const (
// []time.Time, []*time.Time, []NullTime - TIMESTAMP ARRAY
// Date, *Date, NullDate - DATE
// []Date, []*Date, []NullDate - DATE ARRAY
// big.Rat, *big.Rat, NullNumeric - NUMERIC
// []big.Rat, []*big.Rat, []NullNumeric - NUMERIC ARRAY
//
// To compare two Mutations for testing purposes, use reflect.DeepEqual.
type Mutation struct {
Expand Down
1 change: 1 addition & 0 deletions spanner/value.go
Expand Up @@ -3067,6 +3067,7 @@ func isSupportedMutationType(v interface{}) bool {
float64, *float64, []float64, []*float64, NullFloat64, []NullFloat64,
time.Time, *time.Time, []time.Time, []*time.Time, NullTime, []NullTime,
civil.Date, *civil.Date, []civil.Date, []*civil.Date, NullDate, []NullDate,
big.Rat, *big.Rat, []big.Rat, []*big.Rat, NullNumeric, []NullNumeric,
GenericColumnValue:
return true
default:
Expand Down

0 comments on commit fa90737

Please sign in to comment.