Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 57 for alice (0.33 sec)

  1. callbacks/create_test.go

    	s, err := schema.Parse(&user{}, schemaCache, schema.NamingStrategy{})
    	if err != nil {
    		t.Errorf("parse schema error: %v, is not expected", err)
    		return
    	}
    	dest := []*user{
    		{
    			ID:    1,
    			Name:  "alice",
    			Email: "email",
    			Age:   18,
    		},
    		{
    			ID:    2,
    			Name:  "bob",
    			Email: "email",
    			Age:   19,
    		},
    	}
    	stmt := &gorm.Statement{
    		DB: &gorm.DB{
    			Config: &gorm.Config{
    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. src/cmd/compile/internal/ssa/allocators.go

    	s := unsafeheader.Slice{
    		Data: unsafe.Pointer(&b[0]),
    		Len:  n,
    		Cap:  cap(b) * int(scale),
    	}
    	return *(*[]*Block)(unsafe.Pointer(&s))
    }
    func (c *Cache) freeBlockSlice(s []*Block) {
    	var base *Value
    	var derived *Block
    	scale := unsafe.Sizeof(base) / unsafe.Sizeof(derived)
    	b := unsafeheader.Slice{
    		Data: unsafe.Pointer(&s[0]),
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 15 23:00:54 UTC 2023
    - 7.4K bytes
    - Viewed (0)
  3. tests/associations_has_one_test.go

    		t.Errorf("account's number should not be saved")
    	}
    }
    
    func TestHasOneAssociationForSlice(t *testing.T) {
    	users := []User{
    		*GetUser("slice-hasone-1", Config{Account: true}),
    		*GetUser("slice-hasone-2", Config{Account: false}),
    		*GetUser("slice-hasone-3", Config{Account: true}),
    	}
    
    	DB.Create(&users)
    
    	// Count
    	AssertAssociationCount(t, users, "Account", 2, "")
    
    	// Find
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 10:49:45 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  4. schema/utils.go

    				result := reflect.Indirect(rel.Field.ReflectValueOf(ctx, value))
    				switch result.Kind() {
    				case reflect.Struct:
    					reflectResults = reflect.Append(reflectResults, result.Addr())
    				case reflect.Slice, reflect.Array:
    					for i := 0; i < result.Len(); i++ {
    						if elem := result.Index(i); elem.Kind() == reflect.Ptr {
    							reflectResults = reflect.Append(reflectResults, elem)
    						} else {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Sat Aug 19 13:35:14 UTC 2023
    - 5.5K bytes
    - Viewed (0)
  5. utils/tests/utils.go

    			t.Errorf("%v: expect: %+v, got %+v", utils.FileWithLineNum(), expect, got)
    			return
    		}
    
    		if reflect.ValueOf(got).Kind() == reflect.Slice {
    			if reflect.ValueOf(expect).Kind() == reflect.Slice {
    				if reflect.ValueOf(got).Len() == reflect.ValueOf(expect).Len() {
    					for i := 0; i < reflect.ValueOf(got).Len(); i++ {
    						name := fmt.Sprintf(reflect.ValueOf(got).Type().Name()+" #%v", i)
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Fri Mar 10 09:21:56 UTC 2023
    - 3.9K bytes
    - Viewed (0)
  6. src/cmd/go/internal/modindex/write.go

    // encodeModuleBytes may modify the packages slice.
    func encodeModuleBytes(packages []*rawPackage) []byte {
    	e := newEncoder()
    	e.Bytes([]byte(indexVersion + "\n"))
    	stringTableOffsetPos := e.Pos() // fill this at the end
    	e.Uint32(0)                     // string table offset
    	sort.Slice(packages, func(i, j int) bool {
    		return packages[i].dir < packages[j].dir
    	})
    	e.Int(len(packages))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 23 10:10:21 UTC 2023
    - 3.7K bytes
    - Viewed (0)
  7. src/archive/tar/strconv.go

    	err error // Last error seen
    }
    
    type formatter struct {
    	err error // Last error seen
    }
    
    // parseString parses bytes as a NUL-terminated C-style string.
    // If a NUL byte is not found then the whole slice is returned as a string.
    func (*parser) parseString(b []byte) string {
    	if i := bytes.IndexByte(b, 0); i >= 0 {
    		return string(b[:i])
    	}
    	return string(b)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 01 14:28:42 UTC 2023
    - 9K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/walk/closure.go

    			panic("closure type does not match order's assigned type")
    		}
    		addr.Prealloc = x
    		clo.Prealloc = nil
    	}
    
    	return walkExpr(cfn, init)
    }
    
    // closureArgs returns a slice of expressions that can be used to
    // initialize the given closure's free variables. These correspond
    // one-to-one with the variables in clo.Func.ClosureVars, and will be
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 20 15:56:08 UTC 2023
    - 6.5K bytes
    - Viewed (0)
  9. tests/associations_belongs_to_test.go

    		&Company{Name: "company-slice-append-1"},
    		&Company{Name: "company-slice-append-2"},
    		&Company{Name: "company-slice-append-3"},
    	)
    
    	AssertAssociationCount(t, users, "Company", 3, "After Append")
    
    	DB.Model(&users).Association("Manager").Append(
    		GetUser("manager-slice-belongs-to-1", Config{}),
    		GetUser("manager-slice-belongs-to-2", Config{}),
    		GetUser("manager-slice-belongs-to-3", Config{}),
    	)
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Oct 30 09:15:49 UTC 2023
    - 9.3K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/reflectdata/helpers.go

    	return kindRType(pos, typ, types.TCHAN)
    }
    
    // sliceElemRType asserts that typ is a slice type, and returns an
    // expression that yields the *runtime._type value representing typ's
    // element type.
    func sliceElemRType(pos src.XPos, typ *types.Type) ir.Node {
    	base.AssertfAt(typ.IsSlice(), pos, "want slice type, have %v", typ)
    	return TypePtrAt(pos, typ.Elem())
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 12 04:50:32 UTC 2023
    - 7.1K bytes
    - Viewed (0)
Back to top