@@ -96,7 +96,7 @@ func getStructFieldPointers(v reflect.Value, namer sqldb.StructFieldNamer, ignor
96
96
return nil
97
97
}
98
98
99
- // structFieldValues returns the struct field names using the passed namer ignoring names in ignoreNames
99
+ // writeableStructFieldValues returns the struct field names using the passed namer ignoring names in ignoreNames
100
100
// and if restrictToNames is not empty, then filtering out names not in it.
101
101
// struct fields with ,readonly suffix in their struct field naming tag will not be returned
102
102
// because this function is intended for getting struct values for writing.
@@ -105,7 +105,7 @@ func getStructFieldPointers(v reflect.Value, namer sqldb.StructFieldNamer, ignor
105
105
// The same number of pkCol bools will be returend as names, every corresponding bool marking
106
106
// if the name had the ,pk suffix in their struct field naming tag.
107
107
// If false is passed for keepReadOnly then
108
- func structFieldValues (v reflect.Value , namer sqldb.StructFieldNamer , ignoreNames , restrictToNames []string , keepPK bool ) (names []string , flags []sqldb.FieldFlag , vals []any ) {
108
+ func writeableStructFieldValues (v reflect.Value , namer sqldb.StructFieldNamer , ignoreNames , restrictToNames []string , keepPK bool ) (names []string , flags []sqldb.FieldFlag , vals []any ) {
109
109
for i := 0 ; i < v .NumField (); i ++ {
110
110
field := v .Type ().Field (i )
111
111
name , flag , ok := namer .StructFieldName (field )
@@ -114,7 +114,7 @@ func structFieldValues(v reflect.Value, namer sqldb.StructFieldNamer, ignoreName
114
114
}
115
115
116
116
if field .Anonymous {
117
- embedNames , embedFlags , embedValues := structFieldValues (v .Field (i ), namer , ignoreNames , restrictToNames , keepPK )
117
+ embedNames , embedFlags , embedValues := writeableStructFieldValues (v .Field (i ), namer , ignoreNames , restrictToNames , keepPK )
118
118
names = append (names , embedNames ... )
119
119
flags = append (flags , embedFlags ... )
120
120
vals = append (vals , embedValues ... )
0 commit comments