Skip to content

Commit

Permalink
PR FIXUP - Rename createEmptyJoin
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewSisley committed Aug 15, 2023
1 parent af262d3 commit 65c1844
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions planner/mapper/mapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -809,12 +809,12 @@ sourceLoop:
propertyMapped := len(mapping.IndexesByName[key]) != 0

if !propertyMapped {
dummyJoin, err := constructDummyJoin(descriptionsRepo, parentCollectionName, mapping, key)
join, err := constructEmptyJoin(descriptionsRepo, parentCollectionName, mapping, key)
if err != nil {
return nil, err
}

newFields = append(newFields, dummyJoin)
newFields = append(newFields, join)
}

keyIndex := mapping.FirstIndexOfName(key)
Expand Down Expand Up @@ -906,8 +906,8 @@ sourceLoop:
return newFields, nil
}

// constructDummyJoin constructs a valid empty join with no requested fields.
func constructDummyJoin(
// constructEmptyJoin constructs a valid empty join with no requested fields.
func constructEmptyJoin(
descriptionsRepo *DescriptionsRepo,
parentCollectionName string,
parentMapping *core.DocumentMapping,
Expand Down Expand Up @@ -1014,7 +1014,7 @@ func resolveSecondaryRelationIDs(
objectFieldName := strings.TrimSuffix(existingField.Name, request.RelatedObjectID)

// We only require the dockey of the related object, so an empty join is all we need.
dummyJoin, err := constructDummyJoin(
join, err := constructEmptyJoin(
descriptionsRepo,
desc.Name,
mapping,
Expand All @@ -1024,7 +1024,7 @@ func resolveSecondaryRelationIDs(
return nil, err
}

fields = append(fields, dummyJoin)
fields = append(fields, join)
}
}

Expand Down

0 comments on commit 65c1844

Please sign in to comment.