Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for CheckerName (0.17 sec)

  1. schema/naming.go

    func (ns NamingStrategy) RelationshipFKName(rel Relationship) string {
    	return ns.formatName("fk", rel.Schema.Table, ns.toDBName(rel.Name))
    }
    
    // CheckerName generate checker name
    func (ns NamingStrategy) CheckerName(table, column string) string {
    	return ns.formatName("chk", table, column)
    }
    
    // IndexName generate index name
    func (ns NamingStrategy) IndexName(table, column string) string {
    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/naming_test.go

    	}
    	idxName := ns.IndexName("public.table", "name")
    
    	if idxName != "idx_public_table_name" {
    		t.Errorf("invalid index name generated, got %v", idxName)
    	}
    
    	chkName := ns.CheckerName("public.table", "name")
    	if chkName != "chk_public_table_name" {
    		t.Errorf("invalid checker name generated, got %v", chkName)
    	}
    
    	joinTable := ns.JoinTableName("user_languages")
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue May 30 02:00:48 GMT 2023
    - 7K bytes
    - Viewed (0)
  3. schema/constraint.go

    				checks[names[0]] = CheckConstraint{Name: names[0], Constraint: strings.Join(names[1:], ","), Field: field}
    			} else {
    				if names[0] == "" {
    					chk = strings.Join(names[1:], ",")
    				}
    				name := schema.namer.CheckerName(schema.Table, field.DBName)
    				checks[name] = CheckConstraint{Name: name, Constraint: chk, Field: field}
    			}
    		}
    	}
    	return checks
    }
    
    type UniqueConstraint struct {
    	Name  string
    	Field *Field
    }
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Mar 18 07:33:54 GMT 2024
    - 1.9K bytes
    - Viewed (0)
Back to top