Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 201 for exprs (0.19 sec)

  1. clause/where_test.go

    				Exprs: []clause.Expression{clause.Not(clause.Expr{SQL: "`score` <= ?", Vars: []interface{}{100}},
    					clause.Expr{SQL: "`age` <= ?", Vars: []interface{}{60}})},
    			}},
    			"SELECT * FROM `users` WHERE NOT (`score` <= ? AND `age` <= ?)",
    			[]interface{}{100, 60},
    		},
    		{
    			[]clause.Interface{clause.Select{}, clause.From{}, clause.Where{
    				Exprs: []clause.Expression{
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Apr 25 12:22:53 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  2. clause/where.go

    	for idx, expr := range where.Exprs {
    		if v, ok := expr.(OrConditions); !ok || len(v.Exprs) > 1 {
    			if idx != 0 {
    				where.Exprs[0], where.Exprs[idx] = where.Exprs[idx], where.Exprs[0]
    			}
    			break
    		}
    	}
    
    	buildExprs(where.Exprs, builder, AndWithSpace)
    }
    
    func buildExprs(exprs []Expression, builder Builder, joinCond string) {
    	wrapInParentheses := false
    
    	for idx, expr := range exprs {
    		if idx > 0 {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Apr 25 12:22:53 GMT 2024
    - 5.1K bytes
    - Viewed (0)
  3. 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 {
    				switch column := eq.Column.(type) {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 22.7K bytes
    - Viewed (0)
  4. soft_delete.go

    				for _, expr := range where.Exprs {
    					if orCond, ok := expr.(clause.OrConditions); ok && len(orCond.Exprs) == 1 {
    						where.Exprs = []clause.Expression{clause.And(where.Exprs...)}
    						c.Expression = where
    						stmt.Clauses["WHERE"] = c
    						break
    					}
    				}
    			}
    		}
    
    		stmt.AddClause(clause.Where{Exprs: []clause.Expression{
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Wed Feb 01 06:40:55 GMT 2023
    - 4.5K bytes
    - Viewed (0)
  5. 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{
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Nov 03 13:03:13 GMT 2022
    - 2.6K bytes
    - Viewed (0)
  6. 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
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Jan 29 03:34:57 GMT 2024
    - 9.9K bytes
    - Viewed (0)
  7. clause/select.go

    	if s.Expression != nil {
    		if s.Distinct {
    			if expr, ok := s.Expression.(Expr); ok {
    				expr.SQL = "DISTINCT " + expr.SQL
    				clause.Expression = expr
    				return
    			}
    		}
    
    		clause.Expression = s.Expression
    	} else {
    		clause.Expression = s
    	}
    }
    
    // CommaExpression represents a group of expressions separated by commas.
    type CommaExpression struct {
    	Exprs []Expression
    }
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Wed Jul 14 07:51:24 GMT 2021
    - 1.1K bytes
    - Viewed (0)
  8. .idea/dictionaries/igor.xml

    <component name="ProjectDictionaryState">
      <dictionary name="igor">
        <words>
          <w>addr</w>
          <w>descr</w>
          <w>exprs</w>
          <w>voidification</w>
          <w>voidifier</w>
          <w>voidify</w>
        </words>
      </dictionary>
    XML
    - Registered: Fri Apr 26 08:18:10 GMT 2024
    - Last Modified: Thu Sep 16 17:24:44 GMT 2021
    - 249 bytes
    - Viewed (0)
  9. 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))
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Feb 25 02:48:23 GMT 2022
    - 5.6K bytes
    - Viewed (0)
  10. 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%"}),
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Oct 07 12:14:14 GMT 2022
    - 1.9K bytes
    - Viewed (0)
Back to top