- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 160 for Preload (0.06 sec)
-
callbacks/preload.go
identityMap, foreignValues = schema.GetIdentityFieldValuesMap(tx.Statement.Context, reflectValue, foreignFields) if len(foreignValues) == 0 { return nil } } // nested preload for p, pvs := range preloads { tx = tx.Preload(p, pvs...) } reflectResults := rel.FieldSchema.MakeSlice().Elem() column, values := schema.ToQueryValues(clause.CurrentTable, relForeignKeys, foreignValues) if len(values) != 0 {
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
t.Fatalf("Expected first query to preload manager tools, got: %s", query[0]) } } func TestNestedPreloadWithPointerJoin(t *testing.T) { type ( Preload struct { ID uint Value string JoinID uint } Join struct { ID uint Value string Preload Preload NestedID uint } Nested struct { ID uint Join Join
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 10:00:47 UTC 2024 - 15.9K 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) -
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) -
callbacks/query.go
} db.Statement.AddClauseIfNotExists(clauseSelect) db.Statement.Build(db.Statement.BuildClauses...) } } func Preload(db *gorm.DB) { if db.Error == nil && len(db.Statement.Preloads) > 0 { if db.Statement.Schema == nil { db.AddError(fmt.Errorf("%w when using preload", gorm.ErrModelValueRequired)) return } joins := make([]string, 0, len(db.Statement.Joins))
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Aug 22 11:03:42 UTC 2024 - 10.1K bytes - Viewed (1) -
errors.go
// ErrInvalidValueOfLength invalid values do not match length ErrInvalidValueOfLength = errors.New("invalid association values, length doesn't match") // ErrPreloadNotAllowed preload is not allowed when count is used ErrPreloadNotAllowed = errors.New("preload is not allowed when count is used") // ErrDuplicatedKey occurs when there is a unique key constraint violation ErrDuplicatedKey = errors.New("duplicated key not allowed")
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Fri Apr 26 02:53:17 UTC 2024 - 2.5K bytes - Viewed (0) -
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) -
internal/config/browser/browser.go
browserHSTSIncludeSubdomains = "hsts_include_subdomains" // browserHSTSPreload setting name for Strict-Transport-Security response header 'preload' flag (true or false) browserHSTSPreload = "hsts_preload" // browserReferrerPolicy setting name for Referrer-Policy response header browserReferrerPolicy = "referrer_policy"
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jun 21 00:58:58 UTC 2024 - 5.9K bytes - Viewed (0) -
internal/config/browser/help.go
Optional: true, Type: "boolean", }, config.HelpKV{ Key: browserHSTSPreload, Description: `turn 'on' to set Strict-Transport-Security 'preload' directive` + defaultHelpPostfix(browserHSTSPreload), Optional: true, Type: "boolean", }, config.HelpKV{ Key: browserReferrerPolicy,
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jan 01 16:36:33 UTC 2024 - 2.1K bytes - Viewed (0) -
tests/joins_test.go
DB.Create(user) userIDs = append(userIDs, user.ID) } var entries []User assert.NotPanics(t, func() { assert.NoError(t, DB.Debug().Preload("Manager.Team"). Joins("Manager.Company"). Find(&entries).Error) }) } func TestJoinsPreload_Issue7013_RelationEmpty(t *testing.T) { type ( Furniture struct { gorm.Model
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 17 03:58:13 UTC 2024 - 15K bytes - Viewed (0)