Skip to content

Commit 42180cf

Browse files
Sunny Singhharshachinta
Sunny Singh
andauthored
fix(spanner): Expose Mutations field in MutationGroup (#8923)
* fix(spanner): Expose Mutations field in MutationGroup * Update spanner/mutation.go Co-authored-by: Sri Harsha CH <[email protected]> --------- Co-authored-by: Sri Harsha CH <[email protected]>
1 parent 507d232 commit 42180cf

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

spanner/integration_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ func TestIntegration_BatchWrite(t *testing.T) {
924924
w.row)
925925
ms := make([]*Mutation, 1)
926926
ms[0] = m
927-
mgs[i] = &MutationGroup{mutations: ms}
927+
mgs[i] = &MutationGroup{Mutations: ms}
928928
}
929929
// Records the mutation group indexes received in the response.
930930
seen := make(map[int32]int32)

spanner/mutation.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ type Mutation struct {
143143

144144
// A MutationGroup is a list of Mutation to be committed atomically.
145145
type MutationGroup struct {
146-
// The mutations in this group
147-
mutations []*Mutation
146+
// The Mutations in this group
147+
Mutations []*Mutation
148148
}
149149

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

0 commit comments

Comments
 (0)