- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 21 for Exprs (0.11 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) -
finisher_api.go
} return tx.Create(dest) } else if len(db.Statement.assigns) > 0 { exprs := tx.Statement.BuildCondition(db.Statement.assigns[0], db.Statement.assigns[1:]...) assigns := map[string]interface{}{} for i := 0; i < len(exprs); i++ { expr := exprs[i] if eq, ok := expr.(clause.AndConditions); ok { exprs = append(exprs, eq.Exprs...) } else if eq, ok := expr.(clause.Eq); 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) -
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/query.go
} exprs = append(exprs, clause.Expr{SQL: onSQL, Vars: vars}) } } } } return clause.Join{ Type: joinType, Table: clause.Table{Name: relation.FieldSchema.Table, Alias: tableAliasName}, ON: clause.Where{Exprs: exprs}, } } parentTableName := clause.CurrentTable
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Aug 22 11:03:42 UTC 2024 - 10.1K bytes - Viewed (1) -
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) -
chainable_api.go
optimizer.ModifyStatement(tx.Statement) } else { whereConds = append(whereConds, cond) } } if len(whereConds) > 0 { tx.Statement.AddClause(clause.Where{Exprs: tx.Statement.BuildCondition(whereConds[0], whereConds[1:]...)}) } return } var tableRegexp = regexp.MustCompile(`(?i)(?:.+? AS (\w+)\s*(?:$|,)|^\w+\s+(\w+)$)`)
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 24 09:42:59 UTC 2024 - 14.8K bytes - Viewed (0)