Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 83 for expr (0.14 sec)

  1. src/cmd/asm/internal/asm/expr_test.go

    }
    
    func TestExpr(t *testing.T) {
    	p := NewParser(nil, nil, nil) // Expression evaluation uses none of these fields of the parser.
    	for i, test := range exprTests {
    		p.start(lex.Tokenize(test.input))
    		result := int64(p.expr())
    		if result != test.output {
    			t.Errorf("%d: %q evaluated to %d; expected %d", i, test.input, result, test.output)
    		}
    		tok := p.next()
    		if test.atEOF && tok.ScanToken != scanner.EOF {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Aug 29 07:48:38 GMT 2023
    - 3.2K 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 {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Oct 10 06:45:48 GMT 2023
    - 8.3K 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 May 05 09:35:13 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 May 05 09:35:13 GMT 2024
    - Last Modified: Wed Feb 01 06:40:55 GMT 2023
    - 4.5K bytes
    - Viewed (0)
  5. chainable_api.go

    		tx.Statement.TableExpr = &clause.Expr{SQL: name, Vars: args}
    		if results := tableRegexp.FindStringSubmatch(name); len(results) == 3 {
    			if results[1] != "" {
    				tx.Statement.Table = results[1]
    			} else {
    				tx.Statement.Table = results[2]
    			}
    		}
    	} else if tables := strings.Split(name, "."); len(tables) == 2 {
    		tx.Statement.TableExpr = &clause.Expr{SQL: tx.Statement.Quote(name)}
    		tx.Statement.Table = tables[1]
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Wed Apr 17 03:38:55 GMT 2024
    - 14.3K bytes
    - Viewed (1)
  6. migrator/migrator.go

    		}
    	}
    
    	return m.Dialector.DataTypeOf(field)
    }
    
    // FullDataTypeOf returns field's db full data type
    func (m Migrator) FullDataTypeOf(field *schema.Field) (expr clause.Expr) {
    	expr.SQL = m.DataTypeOf(field)
    
    	if field.NotNull {
    		expr.SQL += " NOT NULL"
    	}
    
    	if field.HasDefaultValue && (field.DefaultValueInterface != nil || field.DefaultValue != "") {
    		if field.DefaultValueInterface != nil {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Apr 26 07:15:49 GMT 2024
    - 29K bytes
    - Viewed (0)
  7. clause/select_test.go

    					},
    				},
    			}, clause.From{}},
    			"SELECT `id`, `name`, LENGTH(`mobile`) FROM `users`", nil,
    		},
    		{
    			[]clause.Interface{clause.Select{
    				Expression: clause.CommaExpression{
    					Exprs: []clause.Expression{
    						clause.Expr{
    							SQL: "? as name",
    							Vars: []interface{}{
    								clause.Eq{
    									Column: clause.Column{Name: "age"},
    									Value:  18,
    								},
    							},
    						},
    					},
    				},
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sat Feb 18 01:06:43 GMT 2023
    - 1.7K bytes
    - Viewed (0)
  8. src/cmd/cgo/godefs.go

    		}
    	}
    
    	// Otherwise, if the source file says type T C.whatever,
    	// use "T" as the mangling of C.whatever,
    	// except in the definition (handled at end of function).
    	refName := make(map[*ast.Expr]*Name)
    	for _, r := range f.Ref {
    		refName[r.Expr] = r.Name
    	}
    	for _, d := range f.AST.Decls {
    		d, ok := d.(*ast.GenDecl)
    		if !ok || d.Tok != token.TYPE {
    			continue
    		}
    		for _, s := range d.Specs {
    			s := s.(*ast.TypeSpec)
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Sep 08 14:33:35 GMT 2022
    - 4.5K bytes
    - Viewed (0)
  9. schema/constraint.go

    }
    
    func (chk *CheckConstraint) GetName() string { return chk.Name }
    
    func (chk *CheckConstraint) Build() (sql string, vars []interface{}) {
    	return "CONSTRAINT ? CHECK (?)", []interface{}{clause.Column{Name: chk.Name}, clause.Expr{SQL: chk.Constraint}}
    }
    
    // ParseCheckConstraints parse schema check constraints
    func (schema *Schema) ParseCheckConstraints() map[string]CheckConstraint {
    	checks := map[string]CheckConstraint{}
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Mar 18 07:33:54 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  10. istioctl/pkg/util/configdump/wrapper.go

    // limitations under the License.
    
    package configdump
    
    import (
    	admin "github.com/envoyproxy/go-control-plane/envoy/admin/v3"
    	exprpb "google.golang.org/genproto/googleapis/api/expr/v1alpha1"
    	"google.golang.org/protobuf/reflect/protoreflect"
    	"google.golang.org/protobuf/reflect/protoregistry"
    	"google.golang.org/protobuf/types/known/emptypb"
    
    	"istio.io/istio/pkg/util/protomarshal"
    )
    
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Sun Apr 21 17:42:54 GMT 2024
    - 1.8K bytes
    - Viewed (0)
Back to top