- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 365 for WHERE (0.03 sec)
-
tests/query_test.go
DB.Create(&user) 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{}
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 24 09:42:59 UTC 2024 - 50.4K bytes - Viewed (0) -
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)
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 24 09:42:59 UTC 2024 - 14.8K bytes - Viewed (0) -
tests/scan_test.go
Age int } var res result DB.Table("users").Select("id, name, age").Where("id = ?", user3.ID).Scan(&res) if res.ID != user3.ID || res.Name != user3.Name || res.Age != int(user3.Age) { t.Fatalf("Scan into struct should work, got %#v, should %#v", res, user3) } var resPointer *result if err := DB.Table("users").Select("id, name, age").Where("id = ?", user3.ID).Scan(&resPointer).Error; err != nil {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 10:57:36 UTC 2024 - 10.9K bytes - Viewed (0) -
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
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 17 03:58:13 UTC 2024 - 15K bytes - Viewed (0) -
internal/s3select/sql/statement.go
err = errQueryAnalysisFailure(err) return } // Analyze where clause if selectAST.Where != nil { whereQProp := selectAST.Where.analyze(&selectAST) if whereQProp.err != nil { err = errQueryAnalysisFailure(fmt.Errorf("Where clause error: %w", whereQProp.err)) return } if whereQProp.isAggregation { err = errQueryAnalysisFailure(errors.New("WHERE clause cannot have an aggregation")) return } }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 8.9K bytes - Viewed (0) -
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...) } }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Sep 14 12:58:29 UTC 2024 - 22.8K bytes - Viewed (0) -
docs/en/docs/how-to/custom-docs-ui-assets.md
* `openapi_url`: the URL where the HTML page for the docs can get the OpenAPI schema for your API. You can use here the attribute `app.openapi_url`. * `title`: the title of your API. * `oauth2_redirect_url`: you can use `app.swagger_ui_oauth2_redirect_url` here to use the default. * `swagger_js_url`: the URL where the HTML for your Swagger UI docs can get the **JavaScript** file. This is the custom CDN URL.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon Oct 28 10:42:34 UTC 2024 - 7.3K bytes - Viewed (0) -
docs/en/docs/how-to/conditional-openapi.md
* Implement and use well-known cryptographic tools, like Passlib and JWT tokens, etc. * Add more granular permission controls with OAuth2 scopes where needed. * ...etc. Nevertheless, you might have a very specific use case where you really need to disable the API docs for some environment (e.g. for production) or depending on configurations from environment variables. ## Conditional OpenAPI from settings and env vars
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon Oct 28 11:21:54 UTC 2024 - 2.3K bytes - Viewed (0) -
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 {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 10:49:45 UTC 2024 - 21.5K bytes - Viewed (0) -
statement.go
case *DB: v.executeScopes() if cs, ok := v.Statement.Clauses["WHERE"]; ok { if where, ok := cs.Expression.(clause.Where); ok { if len(where.Exprs) == 1 { if orConds, ok := where.Exprs[0].(clause.OrConditions); ok { where.Exprs[0] = clause.AndConditions(orConds) } } conds = append(conds, clause.And(where.Exprs...)) } else if cs.Expression != nil {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 24 09:42:59 UTC 2024 - 19.9K bytes - Viewed (0)