- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for AllowGlobalUpdate (0.09 sec)
-
gorm.go
// IgnoreRelationshipsWhenMigrating IgnoreRelationshipsWhenMigrating bool // DisableNestedTransaction disable nested transaction DisableNestedTransaction bool // AllowGlobalUpdate allow global update AllowGlobalUpdate bool // QueryFields executes the SQL query with all fields of the table QueryFields bool // CreateBatchSize default create batch size CreateBatchSize int
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Oct 09 11:29:48 UTC 2024 - 12.1K bytes - Viewed (0) -
callbacks/helper.go
return true, 0 } return true, gorm.ScanUpdate } } return false, 0 } func checkMissingWhereConditions(db *gorm.DB) { if !db.AllowGlobalUpdate && db.Error == nil { where, withCondition := db.Statement.Clauses["WHERE"] if withCondition { if _, withSoftDelete := db.Statement.Clauses["soft_delete_enabled"]; withSoftDelete {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Apr 14 12:32:57 UTC 2022 - 3.7K bytes - Viewed (0) -
tests/scanner_valuer_test.go
} if !reflect.DeepEqual([]interface{}{"jinzhu", "POINT(100 100)"}, stmt.Vars) { t.Errorf("generated vars is not equal, got %v", stmt.Vars) } stmt = dryRunDB.Session(&gorm.Session{ AllowGlobalUpdate: true, }).Model(&UserWithPoint{}).Updates(UserWithPoint{ Name: "jinzhu", Point: Point{X: 100, Y: 100}, }).Statement
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 07 07:02:07 UTC 2023 - 10.6K bytes - Viewed (0) -
tests/delete_test.go
if err := DB.Delete(&User{}).Error; err == nil || !errors.Is(err, gorm.ErrMissingWhereClause) { t.Errorf("should returns missing WHERE clause while deleting error") } if err := DB.Session(&gorm.Session{AllowGlobalUpdate: true}).Delete(&User{}).Error; err != nil { t.Errorf("should returns no error while enable global update, but got err %v", err) } } func TestDeleteWithAssociations(t *testing.T) {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Oct 10 07:03:34 UTC 2023 - 9.4K bytes - Viewed (0) -
tests/update_test.go
t.Errorf("should returns missing WHERE clause while updating error, got err %v", err) } if err := DB.Session(&gorm.Session{AllowGlobalUpdate: true}).Model(&User{}).Update("name", "jinzhu").Error; err != nil { t.Errorf("should returns no error while enable global update, but got err %v", err) } } func TestSelectWithUpdate(t *testing.T) {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Dec 04 03:50:58 UTC 2023 - 30.3K bytes - Viewed (0)