- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 331 for Clauses (0.1 sec)
-
chainable_api.go
tx = db.getInstance() tx.Statement.Model = value return } // Clauses Add clauses // // This supports both standard clauses (clause.OrderBy, clause.Limit, clause.Where) and more // advanced techniques like specifying lock strength and optimizer hints. See the // [docs] for more depth. // // // add a simple limit clause // db.Clauses(clause.Limit{Limit: 1}).Find(&User{}) // // tell the optimizer to use the `idx_user_name` index
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 24 09:42:59 UTC 2024 - 14.8K bytes - Viewed (0) -
statement.go
if len(values) > 0 { conds = append(conds, clause.IN{Column: clause.PrimaryColumn, Values: values}) return []clause.Expression{clause.And(conds...)} } return nil } } conds = append(conds, clause.IN{Column: clause.PrimaryColumn, Values: args}) } } } if len(conds) > 0 { return []clause.Expression{clause.And(conds...)} } return 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) -
association.go
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 { tx.Clauses(clause.Where{Exprs: queryConds}) } return tx
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 10:49:45 UTC 2024 - 21.5K bytes - Viewed (0) -
finisher_api.go
if tx.Statement.Distinct { expr = clause.Expr{SQL: "COUNT(DISTINCT(?))", Vars: []interface{}{clause.Column{Name: dbName}}} } else if dbName != "*" { expr = clause.Expr{SQL: "COUNT(?)", Vars: []interface{}{clause.Column{Name: dbName}}} } } } tx.Statement.AddClause(clause.Select{Expression: expr}) } if orderByClause, ok := db.Statement.Clauses["ORDER BY"]; ok {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Sep 14 12:58:29 UTC 2024 - 22.8K bytes - Viewed (0) -
callbacks/query.go
} } func AfterQuery(db *gorm.DB) { // clear the joins after query because preload need it if v, ok := db.Statement.Clauses["FROM"].Expression.(clause.From); ok { fromClause := db.Statement.Clauses["FROM"]
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Aug 22 11:03:42 UTC 2024 - 10.1K bytes - Viewed (1) -
src/main/java/org/codelibs/fess/suggest/util/SuggestUtil.java
if (query instanceof final BooleanQuery booleanQuery) { final List<BooleanClause> clauses = booleanQuery.clauses(); final List<TermQuery> queryList = new ArrayList<>(); for (final BooleanClause clause : clauses) { final Query q = clause.getQuery(); if (q instanceof BooleanQuery) { queryList.addAll(getTermQueryList(q, fields));
Registered: Fri Nov 08 09:08:12 UTC 2024 - Last Modified: Sat Oct 12 00:10:39 UTC 2024 - 11.7K bytes - Viewed (0) -
gorm.go
db.cacheStore.Store(preparedStmtDBKey, preparedStmt) db.ConnPool = preparedStmt } db.Statement = &Statement{ DB: db, ConnPool: db.ConnPool, Context: context.Background(), Clauses: map[string]clause.Clause{}, } if err == nil && !config.DisableAutomaticPing { if pinger, ok := db.ConnPool.(interface{ Ping() error }); ok { err = pinger.Ping() } } if err != nil {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Oct 09 11:29:48 UTC 2024 - 12.1K bytes - Viewed (0) -
tests/query_test.go
type P struct{} var p1 P err := DB.Take(&p1, 1).Error AssertEqual(t, err, gorm.ErrModelAccessibleFieldsRequired) var p2 interface{} err = DB.Table("ps").Clauses(clause.Eq{Column: clause.Column{ Table: clause.CurrentTable, Name: clause.PrimaryKey, }, Value: 1}).Scan(&p2).Error AssertEqual(t, err, gorm.ErrModelValueRequired) } func TestQueryScanToArray(t *testing.T) {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 24 09:42:59 UTC 2024 - 50.4K bytes - Viewed (0) -
docs/pt/docs/tutorial/dependencies/classes-as-dependencies.md
# Classes como Dependências Antes de nos aprofundarmos no sistema de **Injeção de Dependência**, vamos melhorar o exemplo anterior. ## `dict` do exemplo anterior No exemplo anterior, nós retornávamos um `dict` da nossa dependência ("injetável"): //// tab | Python 3.10+ ```Python hl_lines="9" {!> ../../docs_src/dependencies/tutorial001_an_py310.py!} ``` //// //// tab | Python 3.9+ ```Python hl_lines="11"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 11.6K bytes - Viewed (0) -
docs/en/docs/tutorial/dependencies/classes-as-dependencies.md
# Classes as Dependencies Before diving deeper into the **Dependency Injection** system, let's upgrade the previous example. ## A `dict` from the previous example In the previous example, we were returning a `dict` from our dependency ("dependable"): //// tab | Python 3.10+ ```Python hl_lines="9" {!> ../../docs_src/dependencies/tutorial001_an_py310.py!} ``` //// //// tab | Python 3.9+ ```Python hl_lines="11"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 11.1K bytes - Viewed (0)