- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for preloadDB (0.1 sec)
-
callbacks/preload.go
tx.Statement.Unscoped = db.Statement.Unscoped if err := preload(tx, rel, append(preloads[name], associationsConds...), preloadMap[name]); err != nil { return err } } } else { return fmt.Errorf("%s: %w for schema %s", name, gorm.ErrUnsupportedRelation, db.Statement.Schema.Name) } } return nil } func preloadDB(db *gorm.DB, reflectValue reflect.Value, dest interface{}) *gorm.DB {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 10:52:33 UTC 2024 - 11.6K bytes - Viewed (0) -
callbacks/query.go
} tx := preloadDB(db, db.Statement.ReflectValue, db.Statement.Dest) 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
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Aug 22 11:03:42 UTC 2024 - 10.1K bytes - Viewed (1) -
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) -
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) -
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) -
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/hooks_test.go
t.Errorf("should find product, but got error %v", err) } var productWithItem Product4 if err := DB.Session(&gorm.Session{SkipHooks: true}).Preload("Item").First(&productWithItem, "name = ?", product.Name).Error; err != nil { t.Errorf("should find product, but got error %v", err) } if productWithItem.Item.AfterFindCallTimes != 0 {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 17 03:59:06 UTC 2024 - 16.7K bytes - Viewed (0) -
src/main/webapp/js/admin/adminlte.min.js.map
this.fixLayoutHeight()\n })\n\n setTimeout(() => {\n $('body.hold-transition').removeClass('hold-transition')\n }, 50)\n\n setTimeout(() => {\n const $preloader = $(SELECTOR_PRELOADER)\n if ($preloader) {\n $preloader.css('height', 0)\n setTimeout(() => {\n $preloader.children().hide()\n }, 200)\n }\n }, this._config.preloadDuration)\n }\n\n _max(numbers) {\n // Calculate the maximum number in a list\n let max = 0\n\n ...
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Sat Oct 26 01:49:09 UTC 2024 - 132.4K bytes - Viewed (0) -
src/main/webapp/js/admin/adminlte.min.js
unction(){e.fixLayoutHeight("control_sidebar")})),n.default(window).resize((function(){e.fixLayoutHeight()})),setTimeout((function(){n.default("body.hold-transition").removeClass("hold-transition")}),50),setTimeout((function(){var e=n.default(".preloader");e&&(e.css("height",0),setTimeout((function(){e.children().hide()}),200))}),this._config.preloadDuration)},t._max=function(e){var t=0;return Object.keys(e).forEach((function(a){e[a]>t&&(t=e[a])})),t},t._isFooterFixed=function(){return"fixed"===...
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Sat Oct 26 01:49:09 UTC 2024 - 45.3K bytes - Viewed (0)