Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 58 for KSession (0.16 sec)

  1. callbacks/associations.go

    					}
    
    					for i := 0; i < elemLen; i++ {
    						appendToJoins(objs[i], elems.Index(i))
    					}
    				}
    
    				if joins.Len() > 0 {
    					db.AddError(db.Session(&gorm.Session{NewDB: true}).Clauses(clause.OnConflict{DoNothing: true}).Session(&gorm.Session{
    						SkipHooks:                db.Statement.SkipHooks,
    						DisableNestedTransaction: true,
    					}).Create(joins.Interface()).Error)
    				}
    			}
    		}
    	}
    }
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Apr 11 03:06:13 GMT 2023
    - 14.3K bytes
    - Viewed (0)
  2. tests/scopes_test.go

    	}
    
    	db := DB.Scopes(func(tx *gorm.DB) *gorm.DB {
    		return tx.Table("custom_table")
    	}).Session(&gorm.Session{})
    
    	db.AutoMigrate(&User{})
    	if db.Find(&User{}).Statement.Table != "custom_table" {
    		t.Errorf("failed to call Scopes")
    	}
    
    	result := DB.Scopes(NameIn1And2, func(tx *gorm.DB) *gorm.DB {
    		return tx.Session(&gorm.Session{})
    	}).Find(&users1)
    
    	if result.RowsAffected != 2 {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 3.3K bytes
    - Viewed (0)
  3. migrator/migrator.go

    		}
    	}
    
    	return
    }
    
    func (m Migrator) GetQueryAndExecTx() (queryTx, execTx *gorm.DB) {
    	queryTx = m.DB.Session(&gorm.Session{})
    	execTx = queryTx
    	if m.DB.DryRun {
    		queryTx.DryRun = false
    		execTx = m.DB.Session(&gorm.Session{Logger: &printSQLLogger{Interface: m.DB.Logger}})
    	}
    	return queryTx, execTx
    }
    
    // AutoMigrate auto migrate values
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Apr 26 07:15:49 GMT 2024
    - 29K bytes
    - Viewed (0)
  4. tests/distinct_test.go

    		t.Errorf("failed to query users count, got error: %v, count %v", err, count)
    	}
    
    	dryDB := DB.Session(&gorm.Session{DryRun: true})
    	r := dryDB.Distinct("u.id, u.*").Table("user_speaks as s").Joins("inner join users as u on u.id = s.user_id").Where("s.language_code ='US' or s.language_code ='ES'").Find(&User{})
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Jan 06 07:02:53 GMT 2022
    - 2.5K bytes
    - Viewed (0)
  5. tests/hooks_test.go

    	}
    
    	DB.Model(&product).Session(&gorm.Session{SkipHooks: true}).Updates(Product3{Code: "L1216"})
    	if product.Price != 320 || product.Code != "L1216" {
    		t.Errorf("invalid data after update, got %+v", product)
    	}
    
    	var result2 Product3
    	DB.First(&result2, product.ID)
    
    	AssertEqual(t, result2, product)
    
    	product2 := Product3{Name: "Product", Price: 0}
    	DB.Session(&gorm.Session{SkipHooks: true}).Create(&product2)
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sat Feb 18 01:20:29 GMT 2023
    - 15.9K bytes
    - Viewed (0)
  6. tests/upsert_test.go

    	}
    
    	if name := DB.Dialector.Name(); name != "sqlserver" {
    		type RestrictedLanguage struct {
    			Code string `gorm:"primarykey"`
    			Name string
    			Lang string `gorm:"<-:create"`
    		}
    
    		r := DB.Session(&gorm.Session{DryRun: true}).Clauses(clause.OnConflict{UpdateAll: true}).Create(&RestrictedLanguage{Code: "upsert_code", Name: "upsert_name", Lang: "upsert_lang"})
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Sep 05 07:39:19 GMT 2022
    - 11.4K bytes
    - Viewed (0)
  7. cmd/typed-errors.go

    var errInvalidMaxParts = errors.New("Part number is greater than the maximum allowed 10000 parts")
    
    // error returned for session policies > 2048
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  8. internal/config/constants.go

    	EnvRootDiskThresholdSize      = "MINIO_ROOTDISK_THRESHOLD_SIZE" // Deprecated Sep 2023
    	EnvBrowserLoginAnimation      = "MINIO_BROWSER_LOGIN_ANIMATION"
    	EnvBrowserSessionDuration     = "MINIO_BROWSER_SESSION_DURATION" // Deprecated after November 2023
    	EnvMinioStsDuration           = "MINIO_STS_DURATION"
    	EnvMinIOLogQueryURL           = "MINIO_LOG_QUERY_URL"
    	EnvMinIOLogQueryAuthToken     = "MINIO_LOG_QUERY_AUTH_TOKEN"
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Jan 01 16:36:33 GMT 2024
    - 3.4K bytes
    - Viewed (3)
  9. cmd/site-replication.go

    // applicable here.
    //
    // Service accounts are replicated as long as they are not meant for the root
    // user.
    //
    // STS accounts are replicated, but only if the session token is verifiable
    // using the local cluster's root credential.
    func (c *SiteReplicationSys) IAMChangeHook(ctx context.Context, item madmin.SRIAMItem) error {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 01:09:56 GMT 2024
    - 184.2K bytes
    - Viewed (1)
  10. tests/prepared_stmt_test.go

    		tx.Session(&gorm.Session{PrepareStmt: true}).Create(&user)
    		return errors.New("test")
    	}); err == nil {
    		t.Error(err)
    	}
    
    	var result User
    	if err := DB.First(&result, user.ID).Error; err == nil {
    		t.Errorf("Failed, got error: %v", err)
    	}
    }
    
    func TestPreparedStmtReset(t *testing.T) {
    	tx := DB.Session(&gorm.Session{PrepareStmt: true})
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Mar 21 07:55:43 GMT 2024
    - 4K bytes
    - Viewed (0)
Back to top