Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for getName (0.23 sec)

  1. migrator/migrator.go

    	return m.RunWithValue(value, func(stmt *gorm.Statement) error {
    		constraint, table := m.GuessConstraintInterfaceAndTable(stmt, name)
    		if constraint != nil {
    			name = constraint.GetName()
    		}
    		return m.DB.Exec("ALTER TABLE ? DROP CONSTRAINT ?", clause.Table{Name: table}, clause.Column{Name: name}).Error
    	})
    }
    
    // HasConstraint check has constraint or not
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Apr 26 07:15:49 GMT 2024
    - 29K bytes
    - Viewed (0)
  2. schema/relationship.go

    	Schema          *Schema
    	ForeignKeys     []*Field
    	ReferenceSchema *Schema
    	References      []*Field
    	OnDelete        string
    	OnUpdate        string
    }
    
    func (constraint *Constraint) GetName() string { return constraint.Name }
    
    func (constraint *Constraint) Build() (sql string, vars []interface{}) {
    	sql = "CONSTRAINT ? FOREIGN KEY ? REFERENCES ??"
    	if constraint.OnDelete != "" {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 22.4K bytes
    - Viewed (0)
Back to top