- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for mancher (0.15 sec)
-
tests/connpool_test.go
"INSERT INTO `users` (`created_at`,`updated_at`,`deleted_at`,`name`,`age`,`birthday`,`company_id`,`manager_id`,`active`) VALUES (?,?,?,?,?,?,?,?,?)", "SELECT * FROM `users` WHERE name = ? AND `users`.`deleted_at` IS NULL ORDER BY `users`.`id` LIMIT ?", "INSERT INTO `users` (`created_at`,`updated_at`,`deleted_at`,`name`,`age`,`birthday`,`company_id`,`manager_id`,`active`) VALUES (?,?,?,?,?,?,?,?,?)",
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Tue Feb 06 02:54:40 GMT 2024 - 5.5K bytes - Viewed (0) -
tests/prepared_stmt_test.go
) func TestPreparedStmt(t *testing.T) { tx := DB.Session(&gorm.Session{PrepareStmt: true}) if _, ok := tx.ConnPool.(*gorm.PreparedStmtDB); !ok { t.Fatalf("should assign PreparedStatement Manager back to database when using PrepareStmt mode") } ctx, cancel := context.WithTimeout(context.Background(), 500*time.Millisecond) defer cancel() txCtx := tx.WithContext(ctx)
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Mar 21 07:55:43 GMT 2024 - 4K bytes - Viewed (0) -
callbacks.go
"create": {db: db}, "query": {db: db}, "update": {db: db}, "delete": {db: db}, "row": {db: db}, "raw": {db: db}, }, } } // callbacks gorm callbacks manager type callbacks struct { processors map[string]*processor } type processor struct { db *DB Clauses []string fns []func(*DB) callbacks []*callback } type callback struct {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Tue Mar 26 03:33:36 GMT 2024 - 8.6K bytes - Viewed (1) -
utils/utils.go
} return "" } const nestedRelationSplit = "__" // NestedRelationName nested relationships like `Manager__Company` func NestedRelationName(prefix, name string) string { return prefix + nestedRelationSplit + name } // SplitNestedRelationName Split nested relationships to `[]string{"Manager","Company"}` func SplitNestedRelationName(name string) []string { return strings.Split(name, nestedRelationSplit) }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Apr 22 06:43:02 GMT 2024 - 3.8K bytes - Viewed (0) -
utils/tests/models.go
package tests import ( "database/sql" "time" "gorm.io/gorm" ) // User has one `Account` (has one), many `Pets` (has many) and `Toys` (has many - polymorphic) // He works in a Company (belongs to), he has a Manager (belongs to - single-table), and also managed a Team (has many - single-table) // He speaks many languages (many to many) and has many friends (many to many - single-table) // His pet also has one Toy (has one - polymorphic)
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) -
tests/update_belongs_to_test.go
user.Manager.Name += "new2" if err := DB.Session(&gorm.Session{FullSaveAssociations: true}).Select("`Company`").Save(&user).Error; err != nil { t.Fatalf("errors happened when update: %v", err) } var user5 User DB.Preload("Company").Preload("Manager").Find(&user5, "id = ?", user.ID) if user5.Manager.Name != user4.Manager.Name { t.Errorf("should not update user's manager") } else { user.Manager.Name = user4.Manager.Name }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Jul 14 06:55:54 GMT 2022 - 1.6K bytes - Viewed (0) -
tests/helper_test.go
AssertObjEqual(t, user.Company, expect.Company, "ID", "Name") }) t.Run("Manager", func(t *testing.T) { if user.Manager != nil { if user.ManagerID == nil { t.Errorf("Manager's foreign key should be saved") } else { var manager User db(unscoped).First(&manager, "id = ?", *user.ManagerID) AssertObjEqual(t, manager, user.Manager, "ID", "CreatedAt", "UpdatedAt", "DeletedAt", "Name", "Age",
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Tue Mar 19 03:50:28 GMT 2024 - 8K bytes - Viewed (0) -
tests/scan_test.go
Name: "TestScanToEmbedded_1", Manager: &User{ Name: "TestScanToEmbedded_1_m1", Manager: &User{Name: "TestScanToEmbedded_1_m1_m1"}, }, } DB.Create(&user) type UserScan struct { ID uint Name string ManagerID *uint } var user2 UserScan err := DB.Raw("SELECT * FROM users INNER JOIN users Manager ON users.manager_id = Manager.id WHERE users.id = ?", user.ID).Scan(&user2).Error
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Sat May 28 14:18:07 GMT 2022 - 8.2K bytes - Viewed (0) -
tests/associations_belongs_to_test.go
} if err := DB.Model(&user2).Association("Manager").Append(manager); err != nil { t.Fatalf("Error happened when append Manager, got %v", err) } if manager.ID == 0 { t.Fatalf("Manager's ID should be created") } user.Company = company user.Manager = manager user.CompanyID = &company.ID user.ManagerID = &manager.ID CheckUser(t, user2, user)
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/delete_test.go
*GetUser("delete_slice_with_associations2", Config{Account: true, Pets: 3, Toys: 2, Company: true, Manager: true, Team: 2, Languages: 2, Friends: 3}), *GetUser("delete_slice_with_associations3", Config{Account: true, Pets: 2, Toys: 3, Company: true, Manager: true, Team: 3, Languages: 3, Friends: 2}),
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Tue Oct 10 07:03:34 GMT 2023 - 9.4K bytes - Viewed (0)