Skip to content

Commit 94d07f5

Browse files
elianddbclaude
andcommitted
Rename function to follow validate naming pattern
- Rename shouldRejectDecimalMatch to validateDecimalMatch - Consistent with existing codebase validate naming scheme - Update function call to use new name 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent f6751b7 commit 94d07f5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sql/plan/foreign_key_editor.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ func (reference *ForeignKeyReferenceHandler) CheckReference(ctx *sql.Context, ro
513513
}
514514
if err == nil {
515515
// We have a parent row, but for DECIMAL types we need to be strict about precision/scale
516-
if shouldReject := reference.shouldRejectDecimalMatch(ctx, row); shouldReject {
516+
if shouldReject := reference.validateDecimalMatch(ctx, row); shouldReject {
517517
return sql.ErrForeignKeyChildViolation.New(reference.ForeignKey.Name, reference.ForeignKey.Table,
518518
reference.ForeignKey.ParentTable, reference.RowMapper.GetKeyString(row))
519519
}
@@ -544,7 +544,7 @@ func (reference *ForeignKeyReferenceHandler) CheckReference(ctx *sql.Context, ro
544544
reference.ForeignKey.ParentTable, reference.RowMapper.GetKeyString(row))
545545
}
546546

547-
func (reference *ForeignKeyReferenceHandler) shouldRejectDecimalMatch(ctx *sql.Context, row sql.Row) bool {
547+
func (reference *ForeignKeyReferenceHandler) validateDecimalMatch(ctx *sql.Context, row sql.Row) bool {
548548
if reference.RowMapper.Index == nil {
549549
return false
550550
}

0 commit comments

Comments
 (0)