- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 160 for Preloads (0.12 sec)
-
callbacks/preload.go
// If the current relationship is embedded or joined, current query will be ignored. // //nolint:cyclop func preloadEntryPoint(db *gorm.DB, joins []string, relationships *schema.Relationships, preloads map[string][]interface{}, associationsConds []interface{}) error { preloadMap := parsePreloadMap(db.Statement.Schema, preloads) // avoid random traversal of the map
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 10:52:33 UTC 2024 - 11.6K bytes - Viewed (0) -
tests/preload_test.go
Preloads: []*Preload{ {Value: "p1"}, {Value: "p2"}, }, Join: Join{Value: "j1"}, }, } value2 := Value{ Name: "value2", Nested: Nested{ Preloads: []*Preload{ {Value: "p3"}, {Value: "p4"}, {Value: "p5"}, }, Join: Join{Value: "j2"}, }, } values := []*Value{&value1, &value2} if err := DB.Create(&values).Error; err != nil {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 10:00:47 UTC 2024 - 15.9K bytes - Viewed (0) -
callbacks/query.go
if tx.Error != nil { return } db.AddError(preloadEntryPoint(tx, joins, &tx.Statement.Schema.Relationships, db.Statement.Preloads, db.Statement.Preloads[clause.Associations])) } } func AfterQuery(db *gorm.DB) { // clear the joins after query because preload need it if v, ok := db.Statement.Clauses["FROM"].Expression.(clause.From); ok { fromClause := db.Statement.Clauses["FROM"]
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Aug 22 11:03:42 UTC 2024 - 10.1K bytes - Viewed (1) -
chainable_api.go
db = scope(db) } return db } // Preload preload associations with given conditions // // // get all users, and preload all non-cancelled orders // db.Preload("Orders", "state NOT IN (?)", "cancelled").Find(&users) func (db *DB) Preload(query string, args ...interface{}) (tx *DB) { tx = db.getInstance() if tx.Statement.Preloads == nil { tx.Statement.Preloads = map[string][]interface{}{} }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 24 09:42:59 UTC 2024 - 14.8K bytes - Viewed (0) -
statement.go
newStmt.Vars = append(newStmt.Vars, stmt.Vars...) } for k, c := range stmt.Clauses { newStmt.Clauses[k] = c } for k, p := range stmt.Preloads { newStmt.Preloads[k] = p } if len(stmt.Joins) > 0 { newStmt.Joins = make([]join, len(stmt.Joins)) copy(newStmt.Joins, stmt.Joins) } if len(stmt.scopes) > 0 {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 24 09:42:59 UTC 2024 - 19.9K bytes - Viewed (0) -
tests/update_test.go
result.Friends = user2.Friends DB.Select("Name", "Account", "Toys", "Manager", "ManagerID", "Languages").Save(&result) var result2 User DB.Preload("Account").Preload("Pets").Preload("Toys").Preload("Company").Preload("Manager").Preload("Team").Preload("Languages").Preload("Friends").First(&result2, user.ID) result.Languages = append(user.Languages, result.Languages...) result.Toys = append(user.Toys, result.Toys...)
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Dec 04 03:50:58 UTC 2023 - 30.3K bytes - Viewed (0) -
tests/create_test.go
t.Fatalf("errors happened when create: %v", err) } CheckUser(t, user, user) var user2 User DB.Preload("Account").Preload("Pets").Preload("Toys").Preload("Company").Preload("Manager").Preload("Team").Preload("Languages").Preload("Friends").Find(&user2, "id = ?", user.ID) CheckUser(t, user2, user) } func TestBulkCreateWithAssociations(t *testing.T) { users := []User{
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Mar 19 03:50:28 UTC 2024 - 26.4K bytes - Viewed (0) -
cmd/peer-rest-server.go
if objAPI == nil { return np, grid.NewRemoteErr(errServerNotInitialized) } go func() { err := globalTierConfigMgr.Reload(context.Background(), newObjectLayerFn()) if err != nil { peersLogIf(context.Background(), fmt.Errorf("Failed to reload remote tier config %s", err)) } }() return } // ConsoleLogHandler sends console logs of this node back to peer rest client
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Oct 04 11:32:32 UTC 2024 - 53.2K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/dict/mapping/CharMappingFile.java
try (MappingUpdater updater = new MappingUpdater(item)) { reload(updater); } } protected void reload(final MappingUpdater updater) { try (CurlResponse curlResponse = dictionaryManager.getContentResponse(this)) { reload(updater, curlResponse.getContentAsStream()); } catch (final IOException e) {
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Fri Oct 11 21:11:58 UTC 2024 - 10.2K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/dict/protwords/ProtwordsFile.java
try (ProtwordsUpdater updater = new ProtwordsUpdater(item)) { reload(updater); } } protected void reload(final ProtwordsUpdater updater) { try (CurlResponse curlResponse = dictionaryManager.getContentResponse(this)) { reload(updater, curlResponse.getContentAsStream()); } catch (final IOException e) {
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Fri Oct 11 21:11:58 UTC 2024 - 9.6K bytes - Viewed (0)