- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for sessions (0.08 sec)
-
tests/query_test.go
result := DB.Session(&gorm.Session{DryRun: true}).Model(&User{}).Find(&simpleUsers, user.ID) if !regexp.MustCompile("SELECT .*id.*name.*updated_at.*created_at.* FROM .*users").MatchString(result.Statement.SQL.String()) { t.Fatalf("SQL should include selected names, but got %v", result.Statement.SQL.String()) } result = DB.Session(&gorm.Session{DryRun: true}).Model(&User{}).Find(&User{}, user.ID)
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 24 09:42:59 UTC 2024 - 50.4K bytes - Viewed (0) -
tests/migrate_test.go
if err := DB.AutoMigrate(&MigrateInt{}); err != nil { t.Fatalf("Failed to auto migrate: error: %v", err) } // make new session to set custom logger tracer session := DB.Session(&gorm.Session{Logger: tracer}) // The second AutoMigrate to catch an error if err := session.AutoMigrate(&MigrateInt{}); err != nil { t.Fatalf("Failed to auto migrate: error: %v", err) } }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Mar 18 11:24:16 UTC 2024 - 56.2K bytes - Viewed (0)