- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for Must (0.04 sec)
-
tests/non_std_test.go
DB.First(&animal, animal.Counter) if animal.Name != "galeone" { t.Errorf("Name fields shouldn't be changed if untouched, but got %v", animal.Name) } // When changing a field with a default value, the change must occur animal.Name = "amazing horse" DB.Save(&animal) DB.First(&animal, animal.Counter) if animal.Name != "amazing horse" { t.Errorf("Update a filed with a default value should occur. But got %v\n", animal.Name) }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed May 08 04:07:58 UTC 2024 - 1.9K bytes - Viewed (0) -
callbacks.go
} } else if sortedIdx := getRIndex(sorted, c.before); sortedIdx != -1 { if curIdx := getRIndex(sorted, c.name); curIdx == -1 { // if before callback already sorted, append current callback just after it sorted = append(sorted[:sortedIdx], append([]string{c.name}, sorted[sortedIdx:]...)...) } else if curIdx > sortedIdx { return fmt.Errorf("conflicting callback %s with before %s", c.name, c.before) }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Mar 26 03:33:36 UTC 2024 - 8.6K bytes - Viewed (0) -
tests/prepared_stmt_test.go
// for example: one goroutine found error and just close the database, and others are executing SQL // this test making sure that the gorm would not get a Segmentation Fault, // and the only error cause by this is using a closed Stmt or gorm.ErrInvalidDB // and all of the goroutine must got gorm.ErrInvalidDB after database close func TestPreparedStmtConcurrentClose(t *testing.T) {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Aug 22 11:02:05 UTC 2024 - 8.5K bytes - Viewed (0) -
prepare_stmt.go
} return nil, ErrInvalidDB } func (db *PreparedStmtDB) Close() { db.Mux.Lock() defer db.Mux.Unlock() for _, stmt := range db.Stmts { go func(s *Stmt) { // make sure the stmt must finish preparation first <-s.prepared if s.Stmt != nil { _ = s.Close() } }(stmt) } // setting db.Stmts to nil to avoid further using db.Stmts = nil }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Aug 22 11:02:05 UTC 2024 - 6.6K bytes - Viewed (0)