Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 20 for IsStmt (0.15 sec)

  1. 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)
  2. 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)
  3. tests/embedded_struct_test.go

    			t.Errorf("should has prefixed column %v", name)
    		}
    	}
    
    	stmt := gorm.Statement{DB: DB}
    	if err := stmt.Parse(&EngadgetPost{}); err != nil {
    		t.Fatalf("failed to parse embedded struct")
    	} else if len(stmt.Schema.PrimaryFields) != 1 {
    		t.Errorf("should have only one primary field with embedded struct, but got %v", len(stmt.Schema.PrimaryFields))
    	}
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed May 08 04:07:58 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/syntax/positions.go

    		return list[l-1]
    	}
    	return nil
    }
    
    func lastExpr(list []Expr) Expr {
    	if l := len(list); l > 0 {
    		return list[l-1]
    	}
    	return nil
    }
    
    func lastStmt(list []Stmt) Stmt {
    	if l := len(list); l > 0 {
    		return list[l-1]
    	}
    	return nil
    }
    
    func lastField(list []*Field) *Field {
    	if l := len(list); l > 0 {
    		return list[l-1]
    	}
    	return nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 17:49:19 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/httpresponse/httpresponse.go

    // block and returns the suffix of its statements starting with the current
    // node, along with the number of call expressions encountered.
    func restOfBlock(stack []ast.Node) ([]ast.Stmt, int) {
    	var ncalls int
    	for i := len(stack) - 1; i >= 0; i-- {
    		if b, ok := stack[i].(*ast.BlockStmt); ok {
    			for j, v := range b.List {
    				if v == stack[i+1] {
    					return b.List[j:], ncalls
    				}
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 5K bytes
    - Viewed (0)
  6. src/go/ast/example_test.go

    	//     21  .  .  .  .  .  Closing: 3:11
    	//     22  .  .  .  .  }
    	//     23  .  .  .  }
    	//     24  .  .  .  Body: *ast.BlockStmt {
    	//     25  .  .  .  .  Lbrace: 3:13
    	//     26  .  .  .  .  List: []ast.Stmt (len = 1) {
    	//     27  .  .  .  .  .  0: *ast.ExprStmt {
    	//     28  .  .  .  .  .  .  X: *ast.CallExpr {
    	//     29  .  .  .  .  .  .  .  Fun: *ast.Ident {
    	//     30  .  .  .  .  .  .  .  .  NamePos: 4:2
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 21:44:50 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/coverage/cover.go

    	callx := typecheck.Call(pos, fn, []ir.Node{mdauspx, lenx, hashx,
    		pkPathNode, pkIdNode, cmodeNode, cgranNode}, false)
    	assign := callx
    	if pkid == coverage.NotHardCoded {
    		assign = typecheck.Stmt(ir.NewAssignStmt(pos, cnames.PkgIdVar, callx))
    	}
    
    	// Tack the call onto the start of our init function. We do this
    	// early in the init since it's possible that instrumented function
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 29 21:55:46 UTC 2024
    - 6K bytes
    - Viewed (0)
  8. src/go/ast/walk.go

    	// Statements
    	case *BadStmt:
    		// nothing to do
    
    	case *DeclStmt:
    		Walk(v, n.Decl)
    
    	case *EmptyStmt:
    		// nothing to do
    
    	case *LabeledStmt:
    		Walk(v, n.Label)
    		Walk(v, n.Stmt)
    
    	case *ExprStmt:
    		Walk(v, n.X)
    
    	case *SendStmt:
    		Walk(v, n.Chan)
    		Walk(v, n.Value)
    
    	case *IncDecStmt:
    		Walk(v, n.X)
    
    	case *AssignStmt:
    		walkList(v, n.Lhs)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 16:34:10 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  9. src/database/sql/driver/types.go

    // It exists for compatibility.
    func IsScanValue(v any) bool {
    	return IsValue(v)
    }
    
    // DefaultParameterConverter is the default implementation of
    // [ValueConverter] that's used when a [Stmt] doesn't implement
    // [ColumnConverter].
    //
    // DefaultParameterConverter returns its argument directly if
    // IsValue(arg). Otherwise, if the argument implements [Valuer], its
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 27 16:30:20 UTC 2024
    - 8.8K bytes
    - Viewed (0)
  10. src/go/ast/commentmap.go

    			r.next()
    		}
    
    		// update previous node
    		p = q
    		pend = fset.Position(p.End())
    
    		// update previous node group if we see an "important" node
    		switch q.(type) {
    		case *File, *Field, Decl, Spec, Stmt:
    			stack.push(q)
    		}
    	}
    
    	return cmap
    }
    
    // Update replaces an old node in the comment map with the new node
    // and returns the new node. Comments that were associated with the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 8.9K bytes
    - Viewed (0)
Back to top