Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for TrimSpace (0.15 sec)

  1. migrator/migrator.go

    func (m Migrator) MigrateColumn(value interface{}, field *schema.Field, columnType gorm.ColumnType) error {
    	if field.IgnoreMigration {
    		return nil
    	}
    
    	// found, smart migrate
    	fullDataType := strings.TrimSpace(strings.ToLower(m.DB.Migrator().FullDataTypeOf(field).SQL))
    	realDataType := strings.ToLower(columnType.DatabaseTypeName())
    
    	var (
    		alterColumn bool
    		isSameType  = fullDataType == realDataType
    	)
    
    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

    		typeName = polymorphic + "Type"
    		typeId   = polymorphic + "ID"
    	)
    
    	if value, ok := field.TagSettings["POLYMORPHICTYPE"]; ok {
    		typeName = strings.TrimSpace(value)
    	}
    
    	if value, ok := field.TagSettings["POLYMORPHICID"]; ok {
    		typeId = strings.TrimSpace(value)
    	}
    
    	relation.Polymorphic.PolymorphicType = relation.FieldSchema.FieldsByName[typeName]
    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)
  3. schema/field.go

    	}
    
    	if s, ok := field.TagSettings["SCALE"]; ok {
    		field.Scale, _ = strconv.Atoi(s)
    	}
    
    	// default value is function or null or blank (primary keys)
    	field.DefaultValue = strings.TrimSpace(field.DefaultValue)
    	skipParseDefaultValue := strings.Contains(field.DefaultValue, "(") &&
    		strings.Contains(field.DefaultValue, ")") || strings.ToLower(field.DefaultValue) == "null" || field.DefaultValue == ""
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 32K bytes
    - Viewed (1)
Back to top