Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 58 for IsStmt (0.08 sec)

  1. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/unreachable/unreachable.go

    	case *ast.BlockStmt:
    		for _, stmt := range x.List {
    			d.findLabels(stmt)
    		}
    
    	case *ast.BranchStmt:
    		switch x.Tok {
    		case token.GOTO:
    			if x.Label != nil {
    				d.hasGoto[x.Label.Name] = true
    			}
    
    		case token.BREAK:
    			stmt := d.breakTarget
    			if x.Label != nil {
    				stmt = d.labels[x.Label.Name]
    			}
    			if stmt != nil {
    				d.hasBreak[stmt] = true
    			}
    		}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 09 01:28:01 UTC 2023
    - 7.6K bytes
    - Viewed (0)
  2. src/cmd/vendor/golang.org/x/mod/modfile/work.go

    			if _, ok := f.Syntax.Stmt[i].(*CommentBlock); !ok {
    				break
    			}
    		}
    	Found:
    		f.Syntax.Stmt = append(append(f.Syntax.Stmt[:i:i], stmt), f.Syntax.Stmt[i:]...)
    	} else {
    		f.Toolchain.Name = name
    		f.Syntax.updateLine(f.Toolchain.Syntax, "toolchain", name)
    	}
    	return nil
    }
    
    // DropGoStmt deletes the go statement from the file.
    func (f *WorkFile) DropGoStmt() {
    	if f.Go != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 18:34:56 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  3. src/internal/types/testdata/fixedbugs/issue54942.go

    }
    
    type Executor interface {
    	Execute(context.Context, sql.Stmt, int, []sql.NamedArg, int) (Result, error)
    }
    
    type myExecutor struct{}
    
    func (_ *myExecutor) Execute(ctx context.Context, stmt sql.Stmt, maxrows int, args []sql.NamedArg, urgency int) (*Result, error) {
    	return &Result{}, nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 13 15:29:44 UTC 2023
    - 992 bytes
    - Viewed (0)
  4. clause/benchmarks_test.go

    		for _, clause := range clauses {
    			stmt.AddClause(clause)
    		}
    
    		stmt.Build("SELECT", "FROM", "WHERE")
    		_ = stmt.SQL.String()
    	}
    }
    
    func BenchmarkComplexSelect(b *testing.B) {
    	user, _ := schema.Parse(&tests.User{}, &sync.Map{}, db.NamingStrategy)
    
    	limit10 := 10
    	for i := 0; i < b.N; i++ {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Fri Oct 07 12:14:14 UTC 2022
    - 1.9K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/assign/assign.go

    		(*ast.AssignStmt)(nil),
    	}
    	inspect.Preorder(nodeFilter, func(n ast.Node) {
    		stmt := n.(*ast.AssignStmt)
    		if stmt.Tok != token.ASSIGN {
    			return // ignore :=
    		}
    		if len(stmt.Lhs) != len(stmt.Rhs) {
    			// If LHS and RHS have different cardinality, they can't be the same.
    			return
    		}
    		for i, lhs := range stmt.Lhs {
    			rhs := stmt.Rhs[i]
    			if analysisutil.HasSideEffects(pass.TypesInfo, lhs) ||
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  6. callbacks/helper.go

    func ConvertSliceOfMapToValuesForCreate(stmt *gorm.Statement, mapValues []map[string]interface{}) (values clause.Values) {
    	columns := make([]string, 0, len(mapValues))
    
    	// when the length of mapValues is zero,return directly here
    	// no need to call stmt.SelectAndOmitColumns method
    	if len(mapValues) == 0 {
    		stmt.AddError(gorm.ErrEmptySlice)
    		return
    	}
    
    	var (
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Thu Apr 14 12:32:57 UTC 2022
    - 3.7K bytes
    - Viewed (0)
  7. clause/expression_test.go

    			stmt := &gorm.Statement{DB: db, Table: user.Table, Schema: user, Clauses: map[string]clause.Clause{}}
    			clause.NamedExpr{SQL: result.SQL, Vars: result.Vars}.Build(stmt)
    			if stmt.SQL.String() != result.Result {
    				t.Errorf("generated SQL is not equal, expects %v, but got %v", result.Result, stmt.SQL.String())
    			}
    
    			if !reflect.DeepEqual(result.ExpectedVars, stmt.Vars) {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Thu Aug 10 05:34:33 UTC 2023
    - 8.4K bytes
    - Viewed (0)
  8. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/lostcancel/lostcancel.go

    			return true
    		}
    		var id *ast.Ident // id of cancel var
    		stmt := stack[len(stack)-3]
    		switch stmt := stmt.(type) {
    		case *ast.ValueSpec:
    			if len(stmt.Names) > 1 {
    				id = stmt.Names[1]
    			}
    		case *ast.AssignStmt:
    			if len(stmt.Lhs) > 1 {
    				id, _ = stmt.Lhs[1].(*ast.Ident)
    			}
    		}
    		if id != nil {
    			if id.Name == "_" {
    				pass.ReportRangef(id,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 22 19:00:13 UTC 2024
    - 9K bytes
    - Viewed (0)
  9. interfaces.go

    // TxCommitter tx committer
    type TxCommitter interface {
    	Commit() error
    	Rollback() error
    }
    
    // Tx sql.Tx interface
    type Tx interface {
    	ConnPool
    	TxCommitter
    	StmtContext(ctx context.Context, stmt *sql.Stmt) *sql.Stmt
    }
    
    // Valuer gorm valuer interface
    type Valuer interface {
    	GormValue(context.Context, *DB) clause.Expr
    }
    
    // GetDBConnector SQL db connector
    type GetDBConnector interface {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Sat Aug 19 13:33:31 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  10. src/go/types/return.go

    // is "".
    func (check *Checker) isTerminating(s ast.Stmt, label string) bool {
    	switch s := s.(type) {
    	default:
    		panic("unreachable")
    
    	case *ast.BadStmt, *ast.DeclStmt, *ast.EmptyStmt, *ast.SendStmt,
    		*ast.IncDecStmt, *ast.AssignStmt, *ast.GoStmt, *ast.DeferStmt,
    		*ast.RangeStmt:
    		// no chance
    
    	case *ast.LabeledStmt:
    		return check.isTerminating(s.Stmt, s.Label.Name)
    
    	case *ast.ExprStmt:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 22 19:32:17 UTC 2024
    - 4.2K bytes
    - Viewed (0)
Back to top