Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 22 for dry_run (1.93 sec)

  1. tests/sql_builder_test.go

    		t.Errorf("The first join condition is over written instead of combining")
    	}
    }
    
    func TestToSQL(t *testing.T) {
    	// By default DB.DryRun should false
    	if DB.DryRun {
    		t.Fatal("Failed expect DB.DryRun to be false")
    	}
    
    	if DB.Dialector.Name() == "sqlserver" {
    		t.Skip("Skip SQL Server for this test, because it too difference with other dialects.")
    	}
    
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Mon Jul 21 02:46:58 UTC 2025
    - 16.7K bytes
    - Viewed (0)
  2. gorm.go

    	FullSaveAssociations bool
    	// Logger
    	Logger logger.Interface
    	// NowFunc the function to be used when creating a new timestamp
    	NowFunc func() time.Time
    	// DryRun generate sql without execute
    	DryRun bool
    	// PrepareStmt executes the given query in cached statement
    	PrepareStmt bool
    	// PrepareStmt cache support LRU expired,
    	// default maxsize=int64 Max value and ttl=1h
    	PrepareStmtMaxSize int
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Tue Aug 26 06:24:29 UTC 2025
    - 12.8K bytes
    - Viewed (0)
  3. cmd/erasure-healing.go

    func (er *erasureObjects) healObject(ctx context.Context, bucket string, object string, versionID string, opts madmin.HealOpts) (result madmin.HealResultItem, err error) {
    	dryRun := opts.DryRun
    	scanMode := opts.ScanMode
    
    	storageDisks := er.getDisks()
    	storageEndpoints := er.getEndpoints()
    
    	defer func() {
    		er.auditHealObject(ctx, bucket, object, versionID, result, err)
    	}()
    
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 34.6K bytes
    - Viewed (0)
  4. tests/table_test.go

    )
    
    type UserWithTable struct {
    	gorm.Model
    	Name string
    }
    
    func (UserWithTable) TableName() string {
    	return "gorm.user"
    }
    
    func TestTable(t *testing.T) {
    	dryDB := DB.Session(&gorm.Session{DryRun: true})
    
    	r := dryDB.Table("`user`").Find(&User{}).Statement
    	if !regexp.MustCompile("SELECT \\* FROM `user`").MatchString(r.Statement.SQL.String()) {
    		t.Errorf("Table with escape character, got %v", r.Statement.SQL.String())
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Mon Jul 21 02:46:58 UTC 2025
    - 12.7K bytes
    - Viewed (0)
  5. cmd/erasure-healing_test.go

    	// created when the disk was down.
    	err = os.RemoveAll(path.Join(fsDirs[0], bucket))
    	if err != nil {
    		t.Fatal(err)
    	}
    	// This would create the bucket.
    	_, err = obj.HealBucket(ctx, bucket, madmin.HealOpts{
    		DryRun: false,
    		Remove: false,
    	})
    	if err != nil {
    		t.Fatal(err)
    	}
    	// Stat the bucket to make sure that it was created.
    	_, err = er.getDisks()[0].StatVol(t.Context(), bucket)
    	if err != nil {
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 48.5K bytes
    - Viewed (0)
  6. generics.go

    			execG: execG[T]{g: v},
    		},
    	}
    	return v
    }
    
    type g[T any] struct {
    	*createG[T]
    	db  *DB
    	ops []op
    }
    
    func (g *g[T]) apply(ctx context.Context) *DB {
    	db := g.db
    	if !db.DryRun {
    		db = db.Session(&Session{NewDB: true, Context: ctx}).getInstance()
    	}
    
    	for _, op := range g.ops {
    		db = op(db)
    	}
    	return db
    }
    
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Thu Sep 04 13:13:16 UTC 2025
    - 15.5K bytes
    - Viewed (0)
  7. finisher_api.go

    	row, ok := tx.Statement.Dest.(*sql.Row)
    	if !ok && tx.DryRun {
    		db.Logger.Error(tx.Statement.Context, ErrDryRunModeUnsupported.Error())
    	}
    	return row
    }
    
    func (db *DB) Rows() (*sql.Rows, error) {
    	tx := db.getInstance().Set("rows", true)
    	tx = tx.callbacks.Row().Execute(tx)
    	rows, ok := tx.Statement.Dest.(*sql.Rows)
    	if !ok && tx.DryRun && tx.Error == nil {
    		tx.Error = ErrDryRunModeUnsupported
    	}
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Tue Aug 26 06:24:29 UTC 2025
    - 22.9K bytes
    - Viewed (0)
  8. tests/scanner_valuer_test.go

    	}
    }
    
    func TestGORMValuer(t *testing.T) {
    	type UserWithPoint struct {
    		Name  string
    		Point Point
    	}
    
    	dryRunDB := DB.Session(&gorm.Session{DryRun: true})
    
    	stmt := dryRunDB.Create(&UserWithPoint{
    		Name:  "jinzhu",
    		Point: Point{X: 100, Y: 100},
    	}).Statement
    
    	if stmt.SQL.String() == "" || len(stmt.Vars) != 2 {
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Wed Jun 07 07:02:07 UTC 2023
    - 10.6K bytes
    - Viewed (0)
  9. 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"})
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Tue Jul 29 11:06:13 UTC 2025
    - 13.1K bytes
    - Viewed (0)
  10. cmd/admin-handlers_test.go

    		// Valid cases
    		{},
    		{mgmtBucket: "bucket"},
    		{mgmtBucket: "bucket", mgmtPrefix: "objprefix"},
    	}
    
    	// Body is always valid - we do not test JSON decoding.
    	body := `{"recursive": false, "dryRun": true, "remove": false, "scanMode": 0}`
    
    	// Test all combinations!
    	for pIdx, params := range qParamsArr {
    		for vIdx, vars := range varsArr {
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 13.9K bytes
    - Viewed (0)
Back to top