Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. migrator/migrator.go

    			if length > 0 && field.Size > 0 {
    				alterColumn = true
    			} else {
    				// has size in data type and not equal
    				// Since the following code is frequently called in the for loop, reg optimization is needed here
    				matches2 := regFullDataType.FindAllStringSubmatch(fullDataType, -1)
    				if !field.PrimaryKey &&
    					(len(matches2) == 1 && matches2[0][1] != fmt.Sprint(length) && ok) {
    					alterColumn = true
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Apr 26 07:15:49 GMT 2024
    - 29K bytes
    - Viewed (0)
  2. schema/relationship.go

    	// The following code is basically called in for.
    	// In order to avoid the performance problems caused by repeated compilation of regular expressions,
    	// 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{
    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