perf: break early on match failure in ParseConstraint (#7402)

Co-authored-by: 1911860538 <alxps1911@gmail.com>
This commit is contained in:
Name 2025-05-22 10:49:19 +08:00 committed by GitHub
parent 1204330419
commit e3037e4ef0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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