Skip to content

Commit

Permalink
WIP - Move refs from c.desc.Schema to c.Schema
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewSisley committed Oct 2, 2023
1 parent cc398f3 commit 68b1fce
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions db/collection_index.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ func (c *collection) collectIndexedFields() []client.FieldDescription {
fieldsMap := make(map[string]client.FieldDescription)
for _, index := range c.indexes {
for _, field := range index.Description().Fields {
for i := range c.desc.Schema.Fields {
colField := c.desc.Schema.Fields[i]
for i := range c.Schema().Fields {
colField := c.Schema().Fields[i]
if field.Name == colField.Name {
fieldsMap[field.Name] = colField
break
Expand Down Expand Up @@ -297,8 +297,8 @@ func (c *collection) indexExistingDocs(
) error {
fields := make([]client.FieldDescription, 0, 1)
for _, field := range index.Description().Fields {
for i := range c.desc.Schema.Fields {
colField := c.desc.Schema.Fields[i]
for i := range c.Schema().Fields {
colField := c.Schema().Fields[i]
if field.Name == colField.Name {
fields = append(fields, colField)
break
Expand Down Expand Up @@ -422,7 +422,7 @@ func (c *collection) checkExistingFields(
ctx context.Context,
fields []client.IndexedFieldDescription,
) error {
collectionFields := c.Description().Schema.Fields
collectionFields := c.Schema().Fields
for _, field := range fields {
found := false
for _, colField := range collectionFields {
Expand Down

0 comments on commit 68b1fce

Please sign in to comment.