perf: break early on match failure in ParseConstraint

This commit is contained in:
1911860538 2025-03-28 21:23:09 +08:00
parent a9d27293de
commit 61b5449a62

View File

@ -663,6 +663,7 @@ func (rel *Relationship) ParseConstraint() *Constraint {
if !(rel.References[idx].PrimaryKey == ref.PrimaryKey && rel.References[idx].ForeignKey == ref.ForeignKey && if !(rel.References[idx].PrimaryKey == ref.PrimaryKey && rel.References[idx].ForeignKey == ref.ForeignKey &&
rel.References[idx].PrimaryValue == ref.PrimaryValue) { rel.References[idx].PrimaryValue == ref.PrimaryValue) {
matched = false matched = false
break
} }
} }