Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 30 for Expr (0.07 sec)

  1. clause/select.go

    		}
    	} else {
    		builder.WriteByte('*')
    	}
    }
    
    func (s Select) MergeClause(clause *Clause) {
    	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
    	}
    }
    
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Wed Jul 14 07:51:24 UTC 2021
    - 1.1K bytes
    - Viewed (0)
  2. clause/expression.go

    	NegationBuild(builder Builder)
    }
    
    // Expr raw expression
    type Expr struct {
    	SQL                string
    	Vars               []interface{}
    	WithoutParentheses bool
    }
    
    // Build build raw expression
    func (expr Expr) Build(builder Builder) {
    	var (
    		afterParenthesis bool
    		idx              int
    	)
    
    	for _, v := range []byte(expr.SQL) {
    		if v == '?' && len(expr.Vars) > idx {
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Tue Oct 10 06:45:48 UTC 2023
    - 8.3K bytes
    - Viewed (0)
  3. clause/where.go

    	wrapInParentheses := false
    
    	for idx, expr := range exprs {
    		if idx > 0 {
    			if v, ok := expr.(OrConditions); ok && len(v.Exprs) == 1 {
    				builder.WriteString(OrWithSpace)
    			} else {
    				builder.WriteString(joinCond)
    			}
    		}
    
    		if len(exprs) > 1 {
    			switch v := expr.(type) {
    			case OrConditions:
    				if len(v.Exprs) == 1 {
    					if e, ok := v.Exprs[0].(Expr); ok {
    						sql := strings.ToUpper(e.SQL)
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Thu Apr 25 12:22:53 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  4. internal/s3select/sql/statement.go

    		return input.Clone(output), nil
    	}
    
    	for i, expr := range e.selectAST.Expression.Expressions {
    		v, err := expr.evalNode(input, e.tableAlias)
    		if err != nil {
    			return nil, err
    		}
    
    		// Pick output column names
    		if expr.As != "" {
    			output, err = output.Set(expr.As, v)
    		} else if comp, ok := getLastKeypathComponent(expr.Expression); ok {
    			output, err = output.Set(comp, v)
    		} else {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 23 19:35:41 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  5. clause/where_test.go

    					clause.And(clause.Expr{SQL: "`score` <= ?", Vars: []interface{}{100}, WithoutParentheses: false}))},
    			}},
    			"SELECT * FROM `users` WHERE (`users`.`id` <> ? AND NOT `score` <= ?)",
    			[]interface{}{"1", 100},
    		},
    		{
    			[]clause.Interface{clause.Select{}, clause.From{}, clause.Where{
    				Exprs: []clause.Expression{clause.Not(clause.Expr{SQL: "`score` <= ?", Vars: []interface{}{100}},
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Thu Apr 25 12:22:53 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  6. clause/expression_test.go

    		SQL    string
    		Result string
    		Vars   []interface{}
    	}{{
    		SQL:    "create table ? (? ?, ? ?)",
    		Vars:   []interface{}{clause.Table{Name: "users"}, clause.Column{Name: "id"}, clause.Expr{SQL: "int"}, clause.Column{Name: "name"}, clause.Expr{SQL: "text"}},
    		Result: "create table `users` (`id` int, `name` text)",
    	}}
    
    	for idx, result := range results {
    		t.Run(fmt.Sprintf("case #%v", idx), func(t *testing.T) {
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Thu Aug 10 05:34:33 UTC 2023
    - 8.4K bytes
    - Viewed (0)
  7. build-logic/buildquality/src/main/kotlin/gradlebuild/codenarc/rules/IntegrationTestFixturesRule.kt

    package gradlebuild.codenarc.rules
    
    import org.codehaus.groovy.ast.ClassNode
    import org.codehaus.groovy.ast.MethodNode
    import org.codehaus.groovy.ast.expr.Expression
    import org.codehaus.groovy.ast.expr.MethodCallExpression
    import org.codehaus.groovy.ast.expr.PropertyExpression
    import org.codehaus.groovy.ast.expr.VariableExpression
    import org.codenarc.rule.AbstractAstVisitor
    import org.codenarc.rule.AbstractAstVisitorRule
    import org.codenarc.util.AstUtil
    
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Wed Dec 09 08:14:05 UTC 2020
    - 2.6K bytes
    - Viewed (0)
  8. build-logic-commons/code-quality-rules/src/main/java/gradlebuild/codenarc/rules/IntegrationTestFixtureVisitor.java

    import org.codehaus.groovy.ast.ClassNode;
    import org.codehaus.groovy.ast.MethodNode;
    import org.codehaus.groovy.ast.expr.Expression;
    import org.codehaus.groovy.ast.expr.MethodCallExpression;
    import org.codehaus.groovy.ast.expr.PropertyExpression;
    import org.codehaus.groovy.ast.expr.VariableExpression;
    import org.codenarc.rule.AbstractAstVisitor;
    import org.codenarc.util.AstUtil;
    
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Wed Dec 09 08:14:05 UTC 2020
    - 2.9K bytes
    - Viewed (0)
  9. compat/maven-compat/src/main/mdo/paramdoc.mdo

                {
                    for ( java.util.Iterator it = expressions.iterator(); it.hasNext(); )
                    {
                        Expression expr = (Expression) it.next();
    
                        expressionsBySyntax.put( expr.getSyntax(), expr );
                    }
                }
            }
    
            return expressionsBySyntax;
        }
    
        public void flushExpressionsBySyntax()
        {
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  10. internal/s3select/sql/analysis.go

    	case sqlFnSubstring:
    		errVal := fmt.Errorf("Invalid argument(s) to %s", string(funcName))
    		result.combine(e.Substring.Expr.analyze(s))
    		switch {
    		case e.Substring.From != nil:
    			result.combine(e.Substring.From.analyze(s))
    			if e.Substring.For != nil {
    				result.combine(e.Substring.Expr.analyze(s))
    			}
    		case e.Substring.Arg2 != nil:
    			result.combine(e.Substring.Arg2.analyze(s))
    			if e.Substring.Arg3 != nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Dec 23 07:19:11 UTC 2023
    - 8.5K bytes
    - Viewed (0)
Back to top