- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 174 for preload (1.87 sec)
-
tests/generics_test.go
result, err := db.Preload("Company", nil).Preload("Pets", nil).Where("name = ?", u.Name).First(ctx) if err != nil { t.Fatalf("Preload failed: %v", err) } if result.Name != u.Name || result.Company.Name != u.Company.Name || len(result.Pets) != len(u.Pets) { t.Fatalf("Preload expected %s, got %+v", u.Name, result) } results, err := db.Preload("Company", func(db gorm.PreloadBuilder) error {Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Sun Nov 02 14:09:18 UTC 2025 - 33.7K bytes - Viewed (0) -
tests/associations_test.go
func TestAssociationError(t *testing.T) { user := *GetUser("TestAssociationError", Config{Pets: 2, Company: true, Account: true, Languages: 2}) DB.Create(&user) var user1 User DB.Preload("Company").Preload("Pets").Preload("Account").Preload("Languages").First(&user1) var emptyUser User var err error // belongs to err = DB.Model(&emptyUser).Association("Company").Delete(&user1.Company)
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Fri Sep 12 04:33:27 UTC 2025 - 13.3K bytes - Viewed (0) -
tests/association_generics_test.go
t.Fatalf("OpUnlink belongs-to failed: %v", err) } // Reload users to reflect the changes in the database if err := DB.First(&u1, u1.ID).Error; err != nil { t.Fatalf("reload u1: %v", err) } if err := DB.First(&u2, u2.ID).Error; err != nil { t.Fatalf("reload u2: %v", err) } // Check if company associations were cleared
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Fri Sep 12 05:42:26 UTC 2025 - 37.9K bytes - Viewed (0) -
fess-crawler/src/main/java/org/codelibs/fess/crawler/extractor/impl/AbstractXmlExtractor.java
} /** * Returns the preload size for charset detection. * @return The preload size for charset detection. */ public int getPreloadSizeForCharset() { return preloadSizeForCharset; } /** * Sets the preload size for charset detection. * @param preloadSizeForCharset The preload size for charset detection to set. */Registered: Sat Dec 20 11:21:39 UTC 2025 - Last Modified: Sun Nov 23 12:19:14 UTC 2025 - 8.6K bytes - Viewed (0) -
tests/count_test.go
Preload("Toys", func(db *gorm.DB) *gorm.DB { return db.Table("toys").Select("name") }).Count(&count12).Error; err == nil { t.Errorf("error should raise when using preload without schema") } var count13 int64 if err := DB.Model(User{}). Where("name in ?", []string{user1.Name, user2.Name, user3.Name}). Preload("Toys", func(db *gorm.DB) *gorm.DB {Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Mon Sep 08 09:19:22 UTC 2025 - 6.8K 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 Dec 28 09:35:17 UTC 2025 - Last Modified: Fri Sep 19 01:49:06 UTC 2025 - 14.8K 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
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Thu Oct 30 09:30:20 UTC 2025 - 1.8K bytes - Viewed (0) -
fess-crawler/src/main/java/org/codelibs/fess/crawler/transformer/impl/HtmlTransformer.java
} /** * Gets the preload size for charset detection. * * @return the preload size in bytes */ public int getPreloadSizeForCharset() { return preloadSizeForCharset; } /** * Sets the preload size for charset detection. * * @param preloadSizeForCharset the preload size in bytes to set */Registered: Sat Dec 20 11:21:39 UTC 2025 - Last Modified: Sat Nov 29 07:42:33 UTC 2025 - 30.5K bytes - Viewed (0) -
generics.go
func (c chainG[T]) Order(value interface{}) ChainInterface[T] { return c.with(func(db *DB) *DB { return db.Order(value) }) } func (c chainG[T]) Preload(association string, query func(db PreloadBuilder) error) ChainInterface[T] { return c.with(func(db *DB) *DB { return db.Preload(association, func(tx *DB) *DB { q := preloadBuilder{db: tx.getInstance()} if query != nil { if err := query(&q); err != nil {
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Sun Nov 02 14:09:18 UTC 2025 - 25.9K bytes - Viewed (0) -
fess-crawler/src/main/java/org/codelibs/fess/crawler/helper/SitemapsHelper.java
* @return the sitemap set */ public SitemapSet getSitemapSet() { return sitemapSet; } } /** * Sets the preload size for checking file format. * @param preloadSize the preload size in bytes */ public void setPreloadSize(final int preloadSize) { this.preloadSize = preloadSize; } /**Registered: Sat Dec 20 11:21:39 UTC 2025 - Last Modified: Fri Nov 14 13:19:40 UTC 2025 - 34.9K bytes - Viewed (0)