- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 184 for exprs (0.09 sec)
-
clause/benchmarks_test.go
clauses := []clause.Interface{ clause.Select{}, clause.From{}, clause.Where{Exprs: []clause.Expression{ clause.Eq{Column: clause.PrimaryColumn, Value: "1"}, clause.Gt{Column: "age", Value: 18}, clause.Or(clause.Neq{Column: "name", Value: "jinzhu"}), }}, clause.Where{Exprs: []clause.Expression{ clause.Or(clause.Gt{Column: "score", Value: 100}, clause.Like{Column: "name", Value: "%linus%"}),
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Fri Oct 07 12:14:14 UTC 2022 - 1.9K bytes - Viewed (0) -
statement_test.go
for w := 0; w < whereCount; w++ { s = s.clone() s.AddClause(clause.Where{ Exprs: s.BuildCondition(fmt.Sprintf("where%d", w)), }) } s1 := s.clone() s1.AddClause(clause.Where{ Exprs: s.BuildCondition("FINAL1"), }) s2 := s.clone() s2.AddClause(clause.Where{ Exprs: s.BuildCondition("FINAL2"), }) if reflect.DeepEqual(s1.Clauses["WHERE"], s2.Clauses["WHERE"]) {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Dec 23 13:19:41 UTC 2023 - 1.9K bytes - Viewed (0) -
clause/select_test.go
}, }, }, clause.From{}}, "SELECT `id`, `name`, LENGTH(`mobile`) FROM `users`", nil, }, { []clause.Interface{clause.Select{ Expression: clause.CommaExpression{ Exprs: []clause.Expression{ clause.Expr{ SQL: "? as name", Vars: []interface{}{ clause.Eq{ Column: clause.Column{Name: "age"}, Value: 18, }, }, }, }, },
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Feb 18 01:06:43 UTC 2023 - 1.7K bytes - Viewed (0) -
callbacks/delete.go
if c, ok := cond.(clause.IN); ok && len(c.Values) == 0 { withoutConditions = true break } } if !withoutConditions && db.AddError(tx.Clauses(clause.Where{Exprs: queryConds}).Delete(modelValue).Error) != nil { return } case schema.Many2Many: var ( queryConds = make([]clause.Expression, 0, len(rel.References))
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Fri Feb 25 02:48:23 UTC 2022 - 5.6K bytes - Viewed (0) -
clause/joins.go
} else { if join.Type != "" { builder.WriteString(string(join.Type)) builder.WriteByte(' ') } builder.WriteString("JOIN ") builder.WriteQuoted(join.Table) if len(join.ON.Exprs) > 0 { builder.WriteString(" ON ") join.ON.Build(builder) } else if len(join.Using) > 0 { builder.WriteString(" USING (") for idx, c := range join.Using { if idx > 0 { builder.WriteByte(',')
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Nov 03 13:03:13 UTC 2022 - 901 bytes - Viewed (0) -
clause/group_by.go
for idx, column := range groupBy.Columns { if idx > 0 { builder.WriteByte(',') } builder.WriteQuoted(column) } if len(groupBy.Having) > 0 { builder.WriteString(" HAVING ") Where{Exprs: groupBy.Having}.Build(builder) } } // MergeClause merge group by clause func (groupBy GroupBy) MergeClause(clause *Clause) { if v, ok := clause.Expression.(GroupBy); ok {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Mar 30 10:28:09 UTC 2021 - 1K bytes - Viewed (0) -
statement.go
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 { conds = append(conds, cs.Expression) } }
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.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 { 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) -
callbacks/helper.go
if withCondition { if _, withSoftDelete := db.Statement.Clauses["soft_delete_enabled"]; withSoftDelete { whereClause, _ := where.Expression.(clause.Where) withCondition = len(whereClause.Exprs) > 1 } } if !withCondition { db.AddError(gorm.ErrMissingWhereClause) } return } } type visitMap = map[reflect.Value]bool
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Apr 14 12:32:57 UTC 2022 - 3.7K bytes - Viewed (0) -
tests/sql_builder_test.go
newDB.Clauses( clause.From{ Tables: []clause.Table{{Name: "users"}}, Joins: []clause.Join{ { Table: clause.Table{Name: "companies", Raw: false}, ON: clause.Where{ Exprs: []clause.Expression{ clause.Eq{ Column: clause.Column{ Table: "users", Name: "company_id", }, Value: clause.Column{ Table: "companies",
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Fri Jan 12 08:42:21 UTC 2024 - 16.7K bytes - Viewed (0)