Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for DataTypeOf (0.15 sec)

  1. migrator/migrator.go

    	}
    
    	return fc(stmt)
    }
    
    // DataTypeOf return field's db data type
    func (m Migrator) DataTypeOf(field *schema.Field) string {
    	fieldValue := reflect.New(field.IndirectFieldType)
    	if dataTyper, ok := fieldValue.Interface().(GormDataTypeInterface); ok {
    		if dataType := dataTyper.GormDBDataType(m.DB, field); dataType != "" {
    			return dataType
    		}
    	}
    
    	return m.Dialector.DataTypeOf(field)
    }
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Apr 26 07:15:49 GMT 2024
    - 29K bytes
    - Viewed (0)
Back to top