- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for v_size (0.14 sec)
-
migrator/migrator.go
} } if !isSameType { alterColumn = true } } } if !isSameType { // check size if length, ok := columnType.Length(); length != int64(field.Size) { 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
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Apr 26 07:15:49 GMT 2024 - 29K bytes - Viewed (0) -
schema/relationship.go
} relation.Polymorphic.PolymorphicID.GORMDataType = primaryKeyField.GORMDataType if relation.Polymorphic.PolymorphicID.Size == 0 { relation.Polymorphic.PolymorphicID.Size = primaryKeyField.Size } relation.References = append(relation.References, &Reference{ PrimaryKey: primaryKeyField, ForeignKey: relation.Polymorphic.PolymorphicID,
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) -
tests/sql_builder_test.go
ID uint Name string Size string } dryRunDB := DB.Session(&gorm.Session{DryRun: true}) stmt := dryRunDB.Where( DB.Where("pizza = ?", "pepperoni").Where(DB.Where("size = ?", "small").Or("size = ?", "medium")), ).Or( DB.Where("pizza = ?", "hawaiian").Where("size = ?", "xlarge"), ).Find(&Pizza{}).Statement
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Jan 12 08:42:21 GMT 2024 - 16.7K bytes - Viewed (0) -
schema/field.go
} } if field.Size == 0 { switch reflect.Indirect(fieldValue).Kind() { case reflect.Int, reflect.Int64, reflect.Uint, reflect.Uint64, reflect.Float64: field.Size = 64 case reflect.Int8, reflect.Uint8: field.Size = 8 case reflect.Int16, reflect.Uint16: field.Size = 16 case reflect.Int32, reflect.Uint32, reflect.Float32: field.Size = 32 } } // setup permission
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Apr 15 03:20:20 GMT 2024 - 32K bytes - Viewed (1) -
gorm.go
if f == nil { return fmt.Errorf("missing field %s for join table", ref.ForeignKey.DBName) } f.DataType = ref.ForeignKey.DataType f.GORMDataType = ref.ForeignKey.GORMDataType if f.Size == 0 { f.Size = ref.ForeignKey.Size } ref.ForeignKey = f } for name, rel := range relation.JoinTable.Relationships.Relations { if _, ok := joinSchema.Relationships.Relations[name]; !ok { rel.Schema = joinSchema
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Sun Aug 20 11:46:56 GMT 2023 - 11.6K bytes - Viewed (0) -
schema/schema.go
// As of go1.22 the compiler supports one special case of a string constant // being passed to MethodByName. For enterprise customers or those building // large binaries, this gives a significant reduction in binary size. // https://github.com/golang/go/issues/62257 func callBackToMethodValue(modelType reflect.Value, cbType callbackType) reflect.Value { switch cbType { case callbackTypeBeforeCreate:
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Tue Oct 10 06:50:29 GMT 2023 - 13.7K bytes - Viewed (0) -
tests/associations_test.go
Name string Pets []AssociationEmptyPet } type AssociationEmptyPet struct { AssociationEmptyUserID *uint `gorm:"uniqueIndex:uniq_user_id_name"` Name string `gorm:"uniqueIndex:uniq_user_id_name;size:256"` } func TestAssociationEmptyPrimaryKey(t *testing.T) { if DB.Dialector.Name() != "mysql" { t.Skip() } DB.Migrator().DropTable(&AssociationEmptyUser{}, &AssociationEmptyPet{})
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Wed Feb 08 08:29:09 GMT 2023 - 10.9K bytes - Viewed (0)