- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 38 for DELETE (0.15 sec)
-
schema/index_test.go
return } for i, ef := range ei.Fields { af := ai.Fields[i] tests.AssertObjEqual(t, af, ef, "Name", "Unique", "UniqueIndex", "Expression", "Sort", "Collate", "Length") } }) delete(actual, k) } for k := range actual { t.Errorf("unexpected index %q", k) }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Sun Feb 04 07:49:19 GMT 2024 - 8K bytes - Viewed (0) -
tests/transaction_test.go
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Sat Jun 10 13:05:19 GMT 2023 - 10.9K bytes - Viewed (0) -
tests/associations_belongs_to_test.go
// Delete if err := DB.Model(&user2).Association("Company").Delete(&Company{}); err != nil { t.Fatalf("Error happened when delete Company, got %v", err) } AssertAssociationCount(t, user2, "Company", 1, "after delete non-existing data") if err := DB.Model(&user2).Association("Company").Delete(&company2); err != nil { t.Fatalf("Error happened when delete Company, got %v", err) }
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) -
callbacks/callbacks.go
deleteCallback := db.Callback().Delete() deleteCallback.Match(enableTransaction).Register("gorm:begin_transaction", BeginTransaction) deleteCallback.Register("gorm:before_delete", BeforeDelete) deleteCallback.Register("gorm:delete_before_associations", DeleteBeforeAssociations) deleteCallback.Register("gorm:delete", Delete(config)) deleteCallback.Register("gorm:after_delete", AfterDelete)
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Wed Oct 27 23:56:55 GMT 2021 - 3.3K bytes - Viewed (0) -
tests/multi_primary_keys_test.go
} // Delete DB.Model(&blog).Association("Tags").Delete(tag5) var tags3 []Tag DB.Model(&blog).Association("Tags").Find(&tags3) if !compareTags(tags3, []string{"tag6"}) { t.Fatalf("Should find 1 tags after Delete") } if DB.Model(&blog).Association("Tags").Count() != 1 { t.Fatalf("Blog should has three tags after Delete") }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Jan 06 07:02:53 GMT 2022 - 12.8K bytes - Viewed (0) -
tests/joins_table_test.go
t.Fatalf("Failed to find address, got error %v, length: %v", err, len(addresses1)) } if err := DB.Model(&person).Association("Addresses").Delete(&person.Addresses[0]); err != nil { t.Fatalf("Failed to delete address, got error %v", err) } if len(person.Addresses) != 1 { t.Fatalf("Should have one address left") }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Sep 10 13:46:18 GMT 2020 - 3.5K bytes - Viewed (0) -
utils/tests/dummy_dialecter.go
CreateClauses: []string{"INSERT", "VALUES", "ON CONFLICT", "RETURNING"}, UpdateClauses: []string{"UPDATE", "SET", "WHERE", "RETURNING"}, DeleteClauses: []string{"DELETE", "FROM", "WHERE", "RETURNING"}, LastInsertIDReversed: true, }) return nil } func (DummyDialector) DefaultValueOf(field *schema.Field) clause.Expression { return clause.Expr{SQL: "DEFAULT"} }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Mar 06 06:03:31 GMT 2023 - 2.2K bytes - Viewed (0) -
README.md
## Overview * Full-Featured ORM * Associations (Has One, Has Many, Belongs To, Many To Many, Polymorphism, Single-table inheritance) * Hooks (Before/After Create/Save/Update/Delete/Find) * Eager loading with `Preload`, `Joins` * Transactions, Nested Transactions, Save Point, RollbackTo to Saved Point * Context, Prepared Statement Mode, DryRun Mode * Batch Insert, FindInBatches, Find To Map
Plain Text - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Tue Nov 07 02:20:06 GMT 2023 - 1.8K bytes - Viewed (0) -
callbacks/helper.go
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 { whereClause, _ := where.Expression.(clause.Where) withCondition = len(whereClause.Exprs) > 1 } } if !withCondition { db.AddError(gorm.ErrMissingWhereClause) }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Apr 14 12:32:57 GMT 2022 - 3.7K bytes - Viewed (0) -
tests/preload_test.go
} sort.Slice(users3, func(i, j int) bool { return users2[i].ID < users2[j].ID }) for i, u := range users3 { CheckUser(t, u, users[i]) } var user4 User DB.Delete(&users3[0].Account) if err := DB.Preload(clause.Associations).Take(&user4, "id = ?", users3[0].ID).Error; err != nil || user4.Account.ID != 0 { t.Errorf("failed to query, got error %v, account: %#v", err, user4.Account)
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Apr 25 12:21:03 GMT 2024 - 14.9K bytes - Viewed (0)