Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(spanner): support NUMERIC in mutations #3328

Merged
merged 5 commits into from Dec 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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