Remove unused combination evidence and helpers
This commit is contained in:
@@ -23,7 +23,6 @@ type sequenceCombinationResult struct {
|
||||
higherItems []sequenceItemProjection
|
||||
replacements []sequenceItemReplacement
|
||||
appendedHigher []int
|
||||
discardedLower []int
|
||||
}
|
||||
|
||||
func combineSequence(
|
||||
@@ -36,7 +35,7 @@ func combineSequence(
|
||||
}
|
||||
switch policy.operation {
|
||||
case sequenceModeReplace:
|
||||
return replaceSequence(lower, higher, policy.effectiveIdentityFields, context)
|
||||
return replaceSequence(higher, policy.effectiveIdentityFields, context)
|
||||
case sequenceModeAppend, sequenceModeUpsert:
|
||||
return combineIdentifiedSequences(lower, higher, policy.operation, policy.effectiveIdentityFields, context)
|
||||
default:
|
||||
@@ -55,7 +54,7 @@ func unchangedSequenceValue(lower *document.Node) sequenceCombinationResult {
|
||||
}
|
||||
|
||||
func replaceSequence(
|
||||
lower, higher *document.Node,
|
||||
higher *document.Node,
|
||||
identityFields []string,
|
||||
context sequenceCombinationContext,
|
||||
) (sequenceCombinationResult, []Diagnostic) {
|
||||
@@ -68,9 +67,6 @@ func replaceSequence(
|
||||
if higher.Kind == document.Sequence {
|
||||
result.higherItems = sequenceItemProjections(len(higher.Sequence), 0)
|
||||
}
|
||||
if lower != nil && lower.Kind == document.Sequence {
|
||||
result.discardedLower = sequenceIndexes(len(lower.Sequence))
|
||||
}
|
||||
return result, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user