MCPcopy
hub / github.com/go-gorm/gorm / GuessConstraintAndTable

Method GuessConstraintAndTable

migrator/migrator.go:691–701  ·  view source on GitHub ↗

GuessConstraintAndTable guess statement's constraint and it's table based on name Deprecated: use GuessConstraintInterfaceAndTable instead.

(stmt *gorm.Statement, name string)

Source from the content-addressed store, hash-verified

689//
690// Deprecated: use GuessConstraintInterfaceAndTable instead.
691func (m Migrator) GuessConstraintAndTable(stmt *gorm.Statement, name string) (*schema.Constraint, *schema.CheckConstraint, string) {
692 constraint, table := m.GuessConstraintInterfaceAndTable(stmt, name)
693 switch c := constraint.(type) {
694 case *schema.Constraint:
695 return c, nil, table
696 case *schema.CheckConstraint:
697 return nil, c, table
698 default:
699 return nil, nil, table
700 }
701}
702
703// GuessConstraintInterfaceAndTable guess statement's constraint and it's table based on name
704// nolint:cyclop

Callers

nothing calls this directly

Implementers 1

Migratormigrator/migrator.go

Tested by

no test coverage detected