- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for productif (0.24 sec)
-
tests/hooks_test.go
DB.Model(&product).Updates(Product3{Code: "L1214"}) if product.Price != 270 || product.Code != "L1214" { t.Errorf("invalid data after update, got %+v", product) } // Code changed, price should changed DB.Model(&product).Select("Name", "Code", "Price").Updates(Product3{Name: "Product New4", Code: ""}) if product.Name != "Product New4" || product.Price != 320 || product.Code != "" { t.Errorf("invalid data after update, got %+v", product) }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Sat Feb 18 01:20:29 GMT 2023 - 15.9K bytes - Viewed (0) -
tests/create_test.go
t.Fatalf("first or create rows affect err:%v rows:%d", res.Error, res.RowsAffected) } } func TestCreateWithAutoIncrementCompositeKey(t *testing.T) { type CompositeKeyProduct struct { ProductID int `gorm:"primaryKey;autoIncrement:true;"` // primary key LanguageCode int `gorm:"primaryKey;"` // primary key Code string Name string }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Tue Mar 19 03:50:28 GMT 2024 - 26.4K bytes - Viewed (0) -
utils/tests/models.go
AmountOff uint32 `gorm:"column:amount_off"` PercentOff float32 `gorm:"column:percent_off"` } type CouponProduct struct { CouponId int `gorm:"primarykey;size:255"` ProductId string `gorm:"primarykey;size:255"` Desc string } type Order struct { gorm.Model Num string Coupon *Coupon CouponID string } type Parent struct { gorm.Model
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Dec 15 08:36:08 GMT 2023 - 2.1K bytes - Viewed (0) -
clause/insert_test.go
{ []clause.Interface{clause.Insert{Modifier: "LOW_PRIORITY"}}, "INSERT LOW_PRIORITY INTO `users`", nil, }, { []clause.Interface{clause.Insert{Table: clause.Table{Name: "products"}, Modifier: "LOW_PRIORITY"}}, "INSERT LOW_PRIORITY INTO `products`", nil, }, } for idx, result := range results { t.Run(fmt.Sprintf("case #%v", idx), func(t *testing.T) { checkBuildClauses(t, result.Clauses, result.Result, result.Vars)
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Tue Jun 02 01:18:01 GMT 2020 - 737 bytes - Viewed (0) -
clause/update_test.go
}, { []clause.Interface{clause.Update{Modifier: "LOW_PRIORITY"}}, "UPDATE LOW_PRIORITY `users`", nil, }, { []clause.Interface{clause.Update{Table: clause.Table{Name: "products"}, Modifier: "LOW_PRIORITY"}}, "UPDATE LOW_PRIORITY `products`", nil, }, } for idx, result := range results { t.Run(fmt.Sprintf("case #%v", idx), func(t *testing.T) { checkBuildClauses(t, result.Clauses, result.Result, result.Vars)
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Tue Jun 02 01:18:01 GMT 2020 - 722 bytes - Viewed (0) -
tests/migrate_test.go
} err = DB.Table("coupon_product_1").AutoMigrate(&CouponProduct{}) if err != nil { t.Fatalf("AutoMigrate err:%v", err) } err = DB.Table("coupon_product_2").AutoMigrate(&CouponProduct{}) if err != nil { t.Fatalf("AutoMigrate err:%v", err) } AssertEqual(t, true, DB.Migrator().HasTable("coupons")) AssertEqual(t, true, DB.Migrator().HasTable("coupon_product_1"))
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) -
schema/schema_test.go
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Dec 15 08:31:23 GMT 2023 - 12.9K bytes - Viewed (0) -
tests/associations_test.go
t.Fatalf("Should not find deleted profile") } } func TestFullSaveAssociations(t *testing.T) { coupon := &Coupon{ AppliesToProduct: []*CouponProduct{ {ProductId: "full-save-association-product1"}, }, AmountOff: 10, PercentOff: 0.0, } err := DB. Session(&gorm.Session{FullSaveAssociations: true}). Create(coupon).Error if err != nil {
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)