Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for ForeignKeys (0.08 sec)

  1. schema/relationship.go

    		sql += " ON DELETE " + constraint.OnDelete
    	}
    
    	if constraint.OnUpdate != "" {
    		sql += " ON UPDATE " + constraint.OnUpdate
    	}
    
    	foreignKeys := make([]interface{}, 0, len(constraint.ForeignKeys))
    	for _, field := range constraint.ForeignKeys {
    		foreignKeys = append(foreignKeys, clause.Column{Name: field.DBName})
    	}
    
    	references := make([]interface{}, 0, len(constraint.References))
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Wed Jun 12 03:46:59 UTC 2024
    - 22.7K bytes
    - Viewed (0)
  2. association.go

    			rel           = association.Relationship
    			primaryFields []*schema.Field
    			foreignKeys   []string
    			updateAttrs   = map[string]interface{}{}
    			conds         []clause.Expression
    		)
    
    		for _, ref := range rel.References {
    			if ref.PrimaryValue == "" {
    				primaryFields = append(primaryFields, ref.PrimaryKey)
    				foreignKeys = append(foreignKeys, ref.ForeignKey.DBName)
    				updateAttrs[ref.ForeignKey.DBName] = nil
    			} else {
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Wed Jun 12 10:49:45 UTC 2024
    - 21.5K bytes
    - Viewed (0)
Back to top