- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for Exprs (0.02 sec)
-
generics.go
selectExpr := clause.CommaExpression{} for _, column := range q.db.Statement.Selects { selectExpr.Exprs = append(selectExpr.Exprs, clause.Expr{SQL: "?", Vars: []interface{}{clause.Column{Name: column}}}) } if len(selectExpr.Exprs) == 0 { selectExpr.Exprs = []clause.Expression{clause.Expr{SQL: "*", Vars: []interface{}{}}} } partitionBy := clause.CommaExpression{}
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Thu Sep 04 13:13:16 UTC 2025 - 15.5K 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 Sep 07 09:35:13 UTC 2025 - Last Modified: Tue Aug 26 06:24:29 UTC 2025 - 22.9K bytes - Viewed (0) -
statement.go
if where, ok := cs.Expression.(clause.Where); ok { if len(where.Exprs) == 1 { if orConds, ok := where.Exprs[0].(clause.OrConditions); ok { if len(orConds.Exprs) == 1 { 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 Sep 07 09:35:13 UTC 2025 - Last Modified: Thu Sep 04 13:13:16 UTC 2025 - 20.8K bytes - Viewed (0) -
tests/query_test.go
t.Fatalf("Build OR condition, but got %v", result.Statement.SQL.String()) } sub := dryDB.Clauses(clause.Where{ Exprs: []clause.Expression{ clause.OrConditions{ Exprs: []clause.Expression{ clause.Expr{SQL: "role = ?", Vars: []interface{}{"super_admin"}}, clause.Expr{SQL: "role = ?", Vars: []interface{}{"admin"}}, }, }, }, })
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Tue Jul 22 06:21:04 UTC 2025 - 51K 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 Sep 07 09:35:13 UTC 2025 - Last Modified: Mon Jul 21 02:46:58 UTC 2025 - 16.7K bytes - Viewed (0) -
tests/update_test.go
t.Errorf("User's updated at should be changed, old %v, new %v", user2.UpdatedAt.Format(time.RFC1123Z), user3.UpdatedAt.Format(time.RFC1123Z)) } // update with gorm exprs if err := DB.Model(&user3).Updates(map[string]interface{}{"age": gorm.Expr("age + ?", 100)}).Error; err != nil { t.Errorf("Not error should happen when updating with gorm expr, but got %v", err) } var user4 User
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Mon Jul 21 02:46:58 UTC 2025 - 30.4K bytes - Viewed (0)