Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 624 for WHERE (0.14 sec)

  1. 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
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 16.7K bytes
    - Viewed (0)
  2. tests/table_test.go

    		t.Errorf("Table with escape character, got %v", r.Statement.SQL.String())
    	}
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Sat Mar 09 09:31:28 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  3. chainable_api.go

    		tx.Statement.Omits = columns
    	}
    	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)
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Wed Apr 17 03:38:55 GMT 2024
    - 14.3K bytes
    - Viewed (1)
  4. tests/upsert_test.go

    	var user1, user2, user3, user4, user5, user6 User
    	if err := DB.Where(&User{Name: "find or init", Age: 33}).FirstOrInit(&user1).Error; err != nil {
    		t.Errorf("no error should happen when FirstOrInit, but got %v", err)
    	}
    
    	if user1.Name != "find or init" || user1.ID != 0 || user1.Age != 33 {
    		t.Errorf("user should be initialized with search value")
    	}
    
    	DB.Where(User{Name: "find or init", Age: 33}).FirstOrInit(&user2)
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Sep 05 07:39:19 GMT 2022
    - 11.4K bytes
    - Viewed (0)
  5. 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
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Wed Apr 26 14:19:32 GMT 2023
    - 13.5K bytes
    - Viewed (1)
  6. association.go

    			}
    			joinStmt.Build("WHERE")
    			if len(joinStmt.SQL.String()) > 0 {
    				tx.Clauses(clause.Expr{SQL: strings.Replace(joinStmt.SQL.String(), "WHERE ", "", 1), Vars: joinStmt.Vars})
    			}
    		}
    
    		tx = tx.Session(&Session{QueryFields: true}).Clauses(clause.From{Joins: []clause.Join{{
    			Table: clause.Table{Name: association.Relationship.JoinTable.Table},
    			ON:    clause.Where{Exprs: queryConds},
    		}}})
    	} else {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu May 04 11:30:45 GMT 2023
    - 21.2K bytes
    - Viewed (0)
  7. docs/LICENSE

         permission under the Copyright and Similar Rights held by the
         Licensor. For purposes of this Public License, where the Licensed
         Material is a musical work, performance, or sound recording,
         Adapted Material is always produced where the Licensed Material is
         synched in timed relation with a moving image.
    
      b. Adapter's License means the license You apply to Your Copyright
    Plain Text
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon May 10 16:50:06 GMT 2021
    - 18.2K bytes
    - Viewed (0)
  8. build-logic/binary-compatibility/src/test/groovy/gradlebuild/binarycompatibility/PublicAPIRulesTest.groovy

            when:
            annotations.add(incubatingAnnotation)
    
            then:
            rule.maybeViolation(jApiType) == null
    
            where:
            apiElement    | jApiTypeName
            'interface'   | 'jApiClassifier'
            'method'      | 'jApiMethod'
            'field'       | 'jApiField'
            'constructor' | 'jApiConstructor'
        }
    
    Groovy
    - Registered: Wed Apr 24 11:36:11 GMT 2024
    - Last Modified: Fri Dec 01 20:12:19 GMT 2023
    - 16K bytes
    - Viewed (0)
  9. finisher_api.go

    	})
    
    	if tx = queryTx.Find(dest, conds...); tx.RowsAffected == 0 {
    		if c, ok := tx.Statement.Clauses["WHERE"]; ok {
    			if where, ok := c.Expression.(clause.Where); ok {
    				tx.assignInterfacesToValue(where.Exprs)
    			}
    		}
    
    		// initialize with attrs, conds
    		if len(tx.Statement.attrs) > 0 {
    			tx.assignInterfacesToValue(tx.Statement.attrs...)
    		}
    	}
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 22.7K bytes
    - Viewed (0)
  10. callbacks/query.go

    									onStmt.AddClause(c)
    								}
    
    								if join.On != nil {
    									onStmt.AddClause(join.On)
    								}
    
    								if cs, ok := onStmt.Clauses["WHERE"]; ok {
    									if where, ok := cs.Expression.(clause.Where); ok {
    										where.Build(&onStmt)
    
    										if onSQL := onStmt.SQL.String(); onSQL != "" {
    											vars := onStmt.Vars
    											for idx, v := range vars {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Jan 29 03:34:57 GMT 2024
    - 9.9K bytes
    - Viewed (0)
Back to top