Skip to content
Permalink
Browse files
feat(spanner): support NUMERIC in mutations (#3328)
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 fa90737a2adbe0cefbaba4aa1046a6efbba2a0e9
Showing with 3 additions and 0 deletions.
  1. +2 −0 spanner/mutation.go
  2. +1 −0 spanner/value.go
@@ -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 {
@@ -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:

0 comments on commit fa90737

Please sign in to comment.