- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 14 for Exprs (0.07 sec)
-
clause/where.go
if w, ok := clause.Expression.(Where); ok { exprs := make([]Expression, len(w.Exprs)+len(where.Exprs)) copy(exprs, w.Exprs) copy(exprs[len(w.Exprs):], where.Exprs) where.Exprs = exprs } clause.Expression = where } func And(exprs ...Expression) Expression { if len(exprs) == 0 { return nil } if len(exprs) == 1 { if _, ok := exprs[0].(OrConditions); !ok { return exprs[0] }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Apr 25 12:22:53 UTC 2024 - 5.1K bytes - Viewed (0) -
clause/where_test.go
Exprs: []clause.Expression{clause.Or(clause.Neq{Column: "name", Value: "jinzhu"}), clause.Eq{Column: clause.PrimaryColumn, Value: "1"}, clause.Gt{Column: "age", Value: 18}}, }}, "SELECT * FROM `users` WHERE `users`.`id` = ? OR `name` <> ? AND `age` > ?", []interface{}{"1", "jinzhu", 18}, }, { []clause.Interface{clause.Select{}, clause.From{}, clause.Where{
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Apr 25 12:22:53 UTC 2024 - 6.2K bytes - Viewed (0) -
clause/on_conflict.go
} if len(onConflict.TargetWhere.Exprs) > 0 { builder.WriteString(" WHERE ") onConflict.TargetWhere.Build(builder) builder.WriteByte(' ') } } if onConflict.DoNothing { builder.WriteString("DO NOTHING") } else { builder.WriteString("DO UPDATE SET ") onConflict.DoUpdates.Build(builder) } if len(onConflict.Where.Exprs) > 0 { builder.WriteString(" WHERE ")
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Fri Oct 07 05:46:20 UTC 2022 - 1.3K bytes - Viewed (0) -
soft_delete.go
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Feb 01 06:40:55 UTC 2023 - 4.5K bytes - Viewed (1) -
clause/joins_test.go
ON: clause.Where{ Exprs: []clause.Expression{clause.Eq{clause.Column{Table: "user_info", Name: "user_id"}, clause.PrimaryColumn}}, }, }, sql: "LEFT JOIN `user` ON `user_info`.`user_id` = `users`.`id`", }, { name: "RIGHT JOIN", join: clause.Join{ Type: clause.RightJoin, Table: clause.Table{Name: "user"}, ON: clause.Where{
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Nov 03 13:03:13 UTC 2022 - 2.6K bytes - Viewed (0) -
callbacks/update.go
stmt.AddClause(clause.Where{Exprs: []clause.Expression{clause.IN{Column: column, Values: values}}}) } } case reflect.Struct: for _, field := range stmt.Schema.PrimaryFields { if value, isZero := field.ValueOf(stmt.Context, stmt.ReflectValue); !isZero { stmt.AddClause(clause.Where{Exprs: []clause.Expression{clause.Eq{Column: field.DBName, Value: value}}}) } }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Mar 18 05:44:55 UTC 2024 - 9.4K bytes - Viewed (0) -
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) -
clause/select.go
} else { clause.Expression = s } } // CommaExpression represents a group of expressions separated by commas. type CommaExpression struct { Exprs []Expression } func (comma CommaExpression) Build(builder Builder) { for idx, expr := range comma.Exprs { if idx > 0 { _, _ = builder.WriteString(", ") } expr.Build(builder) }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jul 14 07:51:24 UTC 2021 - 1.1K 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) -
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)