Skip to content

Commit

Permalink
fix(spanner): Expose Mutations field in MutationGroup (#8923)
Browse files Browse the repository at this point in the history
* fix(spanner): Expose Mutations field in MutationGroup

* Update spanner/mutation.go

Co-authored-by: Sri Harsha CH <57220027+harshachinta@users.noreply.github.com>

---------

Co-authored-by: Sri Harsha CH <57220027+harshachinta@users.noreply.github.com>
  • Loading branch information
Sunny Singh and harshachinta authored Oct 27, 2023
1 parent 507d232 commit 42180cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion spanner/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@ func TestIntegration_BatchWrite(t *testing.T) {
w.row)
ms := make([]*Mutation, 1)
ms[0] = m
mgs[i] = &MutationGroup{mutations: ms}
mgs[i] = &MutationGroup{Mutations: ms}
}
// Records the mutation group indexes received in the response.
seen := make(map[int32]int32)
Expand Down
6 changes: 3 additions & 3 deletions spanner/mutation.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ type Mutation struct {

// A MutationGroup is a list of Mutation to be committed atomically.
type MutationGroup struct {
// The mutations in this group
mutations []*Mutation
// The Mutations in this group
Mutations []*Mutation
}

// mapToMutationParams converts Go map into mutation parameters.
Expand Down Expand Up @@ -444,7 +444,7 @@ func mutationsProto(ms []*Mutation) ([]*sppb.Mutation, error) {
func mutationGroupsProto(mgs []*MutationGroup) ([]*sppb.BatchWriteRequest_MutationGroup, error) {
gs := make([]*sppb.BatchWriteRequest_MutationGroup, 0, len(mgs))
for _, mg := range mgs {
ms, err := mutationsProto(mg.mutations)
ms, err := mutationsProto(mg.Mutations)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 42180cf

Please sign in to comment.