Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 141 for IsStmt (0.1 sec)

  1. src/cmd/vendor/golang.org/x/tools/go/cfg/cfg.go

    	Kind  BlockKind  // block kind
    	Stmt  ast.Stmt   // statement that gave rise to this block (see BlockKind for details)
    
    	succs2 [2]*Block // underlying array for Succs
    }
    
    // A BlockKind identifies the purpose of a block.
    // It also determines the possible types of its Stmt field.
    type BlockKind uint8
    
    const (
    	KindInvalid BlockKind = iota // Stmt=nil
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/pkginit/initAsanGlobals.go

    		init.Append(typecheck.Stmt(ir.NewAssignStmt(base.Pos, asanFilename, filename)))
    		c = tconv(typecheck.NodAddr(asanFilename), types.Types[types.TUNSAFEPTR])
    		c = tconv(c, types.NewPtr(defStringstruct))
    		c = ir.NewSelectorExpr(base.Pos, ir.ODOT, c, lname("data"))
    		init.Append(typecheck.Stmt(ir.NewAssignStmt(base.Pos, ir.NewSelectorExpr(base.Pos, ir.ODOT, asanLi, lname("filename")), c)))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 17 19:36:24 UTC 2023
    - 8.7K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types2/return.go

    // is "".
    func (check *Checker) isTerminating(s syntax.Stmt, label string) bool {
    	switch s := s.(type) {
    	default:
    		panic("unreachable")
    
    	case *syntax.DeclStmt, *syntax.EmptyStmt, *syntax.SendStmt,
    		*syntax.AssignStmt, *syntax.CallStmt:
    		// no chance
    
    	case *syntax.LabeledStmt:
    		return check.isTerminating(s.Stmt, s.Label.Value)
    
    	case *syntax.ExprStmt:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 22 19:32:17 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  4. gorm.go

    	var (
    		tx                      = db.getInstance()
    		stmt                    = tx.Statement
    		modelSchema, joinSchema *schema.Schema
    	)
    
    	err := stmt.Parse(model)
    	if err != nil {
    		return err
    	}
    	modelSchema = stmt.Schema
    
    	err = stmt.Parse(joinTable)
    	if err != nil {
    		return err
    	}
    	joinSchema = stmt.Schema
    
    	relation, ok := modelSchema.Relationships.Relations[field]
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Sun Aug 20 11:46:56 UTC 2023
    - 11.6K bytes
    - Viewed (0)
  5. clause/joins_test.go

    		t.Run(result.name, func(t *testing.T) {
    			user, _ := schema.Parse(&tests.User{}, &sync.Map{}, db.NamingStrategy)
    			stmt := &gorm.Statement{DB: db, Table: user.Table, Schema: user, Clauses: map[string]clause.Clause{}}
    			result.join.Build(stmt)
    			if result.sql != stmt.SQL.String() {
    				t.Errorf("want: %s, got: %s", result.sql, stmt.SQL.String())
    			}
    		})
    	}
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Thu Nov 03 13:03:13 UTC 2022
    - 2.6K bytes
    - Viewed (0)
  6. src/cmd/vendor/golang.org/x/tools/internal/analysisinternal/analysis.go

    			return expr
    		}
    	}
    	return enclosingStmt.(ast.Stmt)
    }
    
    // baseIfStmt walks up the if/else-if chain until we get to
    // the top of the current if chain.
    func baseIfStmt(path []ast.Node, index int) ast.Stmt {
    	stmt := path[index]
    	for i := index + 1; i < len(path); i++ {
    		if node, ok := path[i].(*ast.IfStmt); ok && node.Else == stmt {
    			stmt = node
    			continue
    		}
    		break
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 11.7K bytes
    - Viewed (0)
  7. src/database/sql/sql.go

    func (tx *Tx) StmtContext(ctx context.Context, stmt *Stmt) *Stmt {
    	dc, release, err := tx.grabConn(ctx)
    	if err != nil {
    		return &Stmt{stickyErr: err}
    	}
    	defer release(nil)
    
    	if tx.db != stmt.db {
    		return &Stmt{stickyErr: errors.New("sql: Tx.Stmt: statement from different database used")}
    	}
    	var si driver.Stmt
    	var parentStmt *Stmt
    	stmt.mu.Lock()
    	if stmt.closed || stmt.cg != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:53 UTC 2024
    - 103.6K bytes
    - Viewed (0)
  8. callbacks/create_test.go

    			Age:   19,
    		},
    	}
    	stmt := &gorm.Statement{
    		DB: &gorm.DB{
    			Config: &gorm.Config{
    				NowFunc: func() time.Time { return time.Time{} },
    			},
    			Statement: &gorm.Statement{
    				Settings: sync.Map{},
    				Schema:   s,
    			},
    		},
    		ReflectValue: reflect.ValueOf(dest),
    		Dest:         dest,
    	}
    
    	stmt.Schema = s
    
    	values := ConvertToCreateValues(stmt)
    	expected := clause.Values{
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Mar 18 05:48:42 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  9. tests/prepared_stmt_test.go

    			wg.Done()
    		}()
    	}
    	wg.Wait()
    
    	conn, ok := tx.ConnPool.(*gorm.PreparedStmtDB)
    	AssertEqual(t, ok, true)
    	AssertEqual(t, len(conn.Stmts), 2)
    	for _, stmt := range conn.Stmts {
    		if stmt == nil {
    			t.Fatalf("stmt cannot bee nil")
    		}
    	}
    
    	AssertEqual(t, sqlDB.Stats().InUse, 0)
    }
    
    func TestPreparedStmtInTransaction(t *testing.T) {
    	user := User{Name: "jinzhu"}
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Thu Mar 21 07:55:43 UTC 2024
    - 4K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/walk/range.go

    	if !ir.DeclaredBy(k, n) {
    		return false
    	}
    
    	if len(n.Body) != 1 {
    		return false
    	}
    
    	stmt := n.Body[0] // only stmt in body
    	if stmt == nil || stmt.Op() != ir.ODELETE {
    		return false
    	}
    
    	m := n.X
    	if delete := stmt.(*ir.CallExpr); !ir.SameSafeExpr(delete.Args[0], m) || !ir.SameSafeExpr(delete.Args[1], k) {
    		return false
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 20 14:52:33 UTC 2023
    - 17.6K bytes
    - Viewed (0)
Back to top