- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for Marcar (0.15 sec)
-
tests/associations_has_many_test.go
type ItemContent struct { gorm.Model ItemID uint `gorm:"not null"` Name string `gorm:"not null;type:varchar(50)"` LanguageCode string `gorm:"not null;type:varchar(2)"` } type Item struct { gorm.Model Logo string `gorm:"not null;type:varchar(50)"` Contents []ItemContent `gorm:"foreignKey:ItemID"` } tx := DB.Session(&gorm.Session{})
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Dec 15 08:36:08 GMT 2023 - 15.6K bytes - Viewed (0) -
migrator.go
Query *DB // required subquery. } // ColumnType column type interface type ColumnType interface { Name() string DatabaseTypeName() string // varchar ColumnType() (columnType string, ok bool) // varchar(64) PrimaryKey() (isPrimaryKey bool, ok bool) AutoIncrement() (isAutoIncrement bool, ok bool) Length() (length int64, ok bool) DecimalSize() (precision int64, scale int64, ok bool)
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Oct 30 09:15:49 GMT 2023 - 3.1K bytes - Viewed (0) -
tests/migrate_test.go
if err != nil { t.Errorf("take err:%v", err) } } func TestDifferentTypeWithoutDeclaredLength(t *testing.T) { type DiffType struct { ID uint Name string `gorm:"type:varchar(20)"` } type DiffType1 struct { ID uint Name string `gorm:"type:text"` } var err error DB.Migrator().DropTable(&DiffType{}) err = DB.AutoMigrate(&DiffType{})
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Mar 18 11:24:16 GMT 2024 - 56.2K bytes - Viewed (0) -
tests/update_test.go
} func (t *TokenOwner) BeforeSave(tx *gorm.DB) error { t.Name += "_name" return nil } type Token struct { UserID int `gorm:"primary_key"` Content string `gorm:"type:varchar(100)"` } func (t *Token) BeforeSave(tx *gorm.DB) error { t.Content += "_encrypted" return nil } func TestSaveWithHooks(t *testing.T) { DB.Migrator().DropTable(&Token{}, &TokenOwner{})
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Dec 04 03:50:58 GMT 2023 - 30.3K bytes - Viewed (0) -
tests/associations_belongs_to_test.go
AssertEqual(t, err, nil) } func TestBelongsToAssociationUnscoped(t *testing.T) { type ItemParent struct { gorm.Model Logo string `gorm:"not null;type:varchar(50)"` } type ItemChild struct { gorm.Model Name string `gorm:"type:varchar(50)"` ItemParentID uint ItemParent ItemParent } tx := DB.Session(&gorm.Session{}) tx.Migrator().DropTable(&ItemParent{}, &ItemChild{})
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Oct 30 09:15:49 GMT 2023 - 9.3K bytes - Viewed (0) -
tests/query_test.go
t.Errorf("Failed, got error: %v", err) } AssertEqual(t, result2.data, 20) } func TestQueryResetNullValue(t *testing.T) { type QueryResetItem struct { ID string `gorm:"type:varchar(5)"` Name string } type QueryResetNullValue struct { ID int Name string `gorm:"default:NULL"` Flag bool `gorm:"default:NULL"`
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Apr 25 12:22:53 GMT 2024 - 49.8K bytes - Viewed (0)