Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for RelationshipFKName (0.24 sec)

  1. schema/naming.go

    	}
    
    	if ns.SingularTable {
    		return ns.TablePrefix + ns.toDBName(str)
    	}
    	return ns.TablePrefix + inflection.Plural(ns.toDBName(str))
    }
    
    // RelationshipFKName generate fk name for relation
    func (ns NamingStrategy) RelationshipFKName(rel Relationship) string {
    	return ns.formatName("fk", rel.Schema.Table, ns.toDBName(rel.Name))
    }
    
    // CheckerName generate checker name
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Oct 30 09:15:49 GMT 2023
    - 5.2K bytes
    - Viewed (0)
  2. schema/relationship.go

    	// it only needs to be done once outside, so optimization is done here.
    	if idx != -1 && regEnLetterAndMidline.MatchString(str[0:idx]) {
    		name = str[0:idx]
    	} else {
    		name = rel.Schema.namer.RelationshipFKName(*rel)
    	}
    
    	constraint := Constraint{
    		Name:     name,
    		Field:    rel.Field,
    		OnUpdate: settings["ONUPDATE"],
    		OnDelete: settings["ONDELETE"],
    	}
    
    	for _, ref := range rel.References {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 22.4K bytes
    - Viewed (0)
Back to top