Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 566 for WHERE (0.02 seconds)

  1. tests/table_test.go

    		t.Errorf("Table with escape character, got %v", r.Statement.SQL.String())
    	}
    
    Created: Sun Apr 05 09:35:12 GMT 2026
    - Last Modified: Mon Jul 21 02:46:58 GMT 2025
    - 12.7K bytes
    - Click Count (0)
  2. tests/query_test.go

    	var result User
    	if DB.Where("").Where("").First(&result).Error != nil {
    		t.Errorf("Should not raise any error if searching with empty strings")
    	}
    
    	result = User{}
    	if DB.Where(&User{}).Where("name = ?", user.Name).First(&result).Error != nil {
    		t.Errorf("Should not raise any error if searching with empty struct")
    	}
    
    	result = User{}
    Created: Sun Apr 05 09:35:12 GMT 2026
    - Last Modified: Tue Jul 22 06:21:04 GMT 2025
    - 51K bytes
    - Click Count (0)
  3. tests/generics_test.go

    	}
    
    	results, err := gorm.G[User](DB).Where("name IN (?)", gorm.G[User](DB).Select("name").Where("name LIKE ?", "GenericsSubquery%")).Find(ctx)
    	if err != nil {
    		t.Fatalf("got error: %v", err)
    	}
    
    	if len(results) != 4 {
    		t.Errorf("Four users should be found, instead found %d", len(results))
    	}
    
    Created: Sun Apr 05 09:35:12 GMT 2026
    - Last Modified: Tue Dec 30 08:11:14 GMT 2025
    - 34.9K bytes
    - Click Count (0)
  4. tests/count_test.go

    	})
    
    	var count1 int64
    	if err := DB.Model(&Company{}).Where("name = ?", "company_count_group_a").Group("name").Count(&count1).Error; err != nil {
    		t.Errorf("Count should work, but got err %v", err)
    	}
    	if count1 != 1 {
    		t.Errorf("Count with group should be 1, but got count: %v", count1)
    	}
    
    	var count2 int64
    Created: Sun Apr 05 09:35:12 GMT 2026
    - Last Modified: Mon Sep 08 09:19:22 GMT 2025
    - 6.8K bytes
    - Click Count (0)
  5. tests/sql_builder_test.go

    		Size string
    	}
    	dryRunDB := DB.Session(&gorm.Session{DryRun: true})
    
    	stmt := dryRunDB.Where(
    		DB.Where("pizza = ?", "pepperoni").Where(DB.Where("size = ?", "small").Or("size = ?", "medium")),
    	).Or(
    		DB.Where("pizza = ?", "hawaiian").Where("size = ?", "xlarge"),
    	).Find(&Pizza{}).Statement
    
    Created: Sun Apr 05 09:35:12 GMT 2026
    - Last Modified: Mon Jul 21 02:46:58 GMT 2025
    - 16.7K bytes
    - Click Count (0)
  6. tests/joins_test.go

    	DB.Save(&user)
    
    	// test where
    	var user1 User
    	onQuery := DB.Where(&Pet{Name: "joins-args-db_pet_2"})
    	if err := DB.Joins("NamedPet", onQuery).Where("users.name = ?", user.Name).First(&user1).Error; err != nil {
    		t.Fatalf("Failed to load with joins on, got error: %v", err)
    	}
    
    	AssertEqual(t, user1.NamedPet.Name, "joins-args-db_pet_2")
    
    	// test where and omit
    Created: Sun Apr 05 09:35:12 GMT 2026
    - Last Modified: Sun May 25 07:40:40 GMT 2025
    - 15K bytes
    - Click Count (0)
  7. .github/workflows/cleanup-stale-performance-data.yml

                -e '
                USE results;
                DELETE FROM testOperation WHERE testExecution IN (SELECT id FROM testExecution WHERE startTime < NOW() - INTERVAL 365 DAY);
                DELETE FROM testExecution WHERE startTime < NOW() - INTERVAL 365 DAY;
                SELECT "results.testExecution count:" as database_table, COUNT(*) as stale_records FROM testExecution WHERE startTime < NOW() - INTERVAL 365 DAY;
                USE cross_build_results;
    Created: Wed Apr 01 11:36:16 GMT 2026
    - Last Modified: Tue Mar 24 22:05:21 GMT 2026
    - 2.6K bytes
    - Click Count (0)
  8. chainable_api.go

    	tx.Statement.ColumnMapping = m
    	return
    }
    
    // Where add conditions
    //
    // See the [docs] for details on the various formats that where clauses can take. By default, where clauses chain with AND.
    //
    //	// Find the first user with name jinzhu
    //	db.Where("name = ?", "jinzhu").First(&user)
    //	// Find the first user with name jinzhu and age 20
    //	db.Where(&User{Name: "jinzhu", Age: 20}).First(&user)
    Created: Sun Apr 05 09:35:12 GMT 2026
    - Last Modified: Fri Sep 19 01:49:06 GMT 2025
    - 14.8K bytes
    - Click Count (0)
  9. internal/s3select/select_test.go

    			query: `SELECT id from s3object s WHERE s.id <= 9223372036854775807`,
    			wantResult: `{"id":0}
    {"id":1}
    {"id":2}
    {"id":3}`,
    		},
    		{
    			name:  "bignum-2",
    			query: `SELECT id from s3object s WHERE s.id >= -9223372036854775808`,
    			wantResult: `{"id":0}
    {"id":1}
    {"id":2}
    {"id":3}`,
    		},
    		{
    			name:       "donatello-3",
    			query:      `SELECT * from s3object s WHERE 'value' IN s.synonyms[*]`,
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Fri Aug 29 02:39:48 GMT 2025
    - 76.1K bytes
    - Click Count (0)
  10. tests/association_generics_test.go

    	if rows, err := gorm.G[User](DB).Where("id = ?", user.ID).Set(createOp).Update(ctx); err != nil {
    		t.Fatalf("create tools: %v", err)
    	} else if rows != 0 {
    		t.Fatalf("rows %d", rows)
    	}
    	AssertAssociationCount(t, user, "Tools", 1, "after create tool")
    
    	unlinkOp := clause.Association{Association: "Tools", Type: clause.OpUnlink}
    	if rows, err := gorm.G[User](DB).Where("id = ?", user.ID).Set(unlinkOp).Update(ctx); err != nil {
    Created: Sun Apr 05 09:35:12 GMT 2026
    - Last Modified: Fri Sep 12 05:42:26 GMT 2025
    - 37.9K bytes
    - Click Count (0)
Back to Top