Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 18 of 18 for Kappen (0.14 sec)

  1. tests/helper_test.go

    	}
    
    	for i := 0; i < config.Pets; i++ {
    		user.Pets = append(user.Pets, &Pet{Name: name + "_pet_" + strconv.Itoa(i+1)})
    	}
    
    	for i := 0; i < config.Toys; i++ {
    		user.Toys = append(user.Toys, Toy{Name: name + "_toy_" + strconv.Itoa(i+1)})
    	}
    
    	for i := 0; i < config.Tools; i++ {
    		user.Tools = append(user.Tools, Tools{Name: name + "_tool_" + strconv.Itoa(i+1)})
    	}
    
    	if config.Company {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Mar 19 03:50:28 GMT 2024
    - 8K bytes
    - Viewed (0)
  2. prepare_stmt.go

    	if err != nil {
    		cacheStmt.prepareErr = err
    		db.Mux.Lock()
    		delete(db.Stmts, query)
    		db.Mux.Unlock()
    		return Stmt{}, err
    	}
    
    	db.Mux.Lock()
    	cacheStmt.Stmt = stmt
    	db.PreparedSQL = append(db.PreparedSQL, query)
    	db.Mux.Unlock()
    
    	return cacheStmt, nil
    }
    
    func (db *PreparedStmtDB) BeginTx(ctx context.Context, opt *sql.TxOptions) (ConnPool, error) {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Mar 28 08:47:39 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  3. callbacks/preload.go

    			if ref.OwnPrimaryKey {
    				joinForeignKeys = append(joinForeignKeys, ref.ForeignKey.DBName)
    				joinForeignFields = append(joinForeignFields, ref.ForeignKey)
    				foreignFields = append(foreignFields, ref.PrimaryKey)
    			} else if ref.PrimaryValue != "" {
    				tx = tx.Where(clause.Eq{Column: ref.ForeignKey.DBName, Value: ref.PrimaryValue})
    			} else {
    				joinRelForeignFields = append(joinRelForeignFields, ref.ForeignKey)
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Apr 25 12:21:03 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  4. callbacks/update.go

    							set = append(set, clause.Assignment{Column: clause.Column{Name: field.DBName}, Value: now.UnixNano()})
    						} else if field.AutoUpdateTime == schema.UnixMillisecond {
    							set = append(set, clause.Assignment{Column: clause.Column{Name: field.DBName}, Value: now.UnixMilli()})
    						} else if field.AutoUpdateTime == schema.UnixSecond {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Mar 18 05:44:55 GMT 2024
    - 9.4K bytes
    - Viewed (1)
  5. tests/preload_test.go

    		}
    	}
    
    	if err := DB.Create(&users).Error; err != nil {
    		t.Fatalf("errors happened when create: %v", err)
    	}
    
    	var userIDs []uint
    	for _, user := range users {
    		userIDs = append(userIDs, user.ID)
    	}
    
    	var users2 []User
    	DB.Preload("Pets.Toy").Find(&users2, "id IN ?", userIDs)
    
    	for idx, user := range users2 {
    		CheckUser(t, user, users[idx])
    	}
    }
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Apr 25 12:21:03 GMT 2024
    - 14.9K bytes
    - Viewed (0)
  6. schema/relationship.go

    		case HasOne:
    			schema.Relationships.HasOne = append(schema.Relationships.HasOne, relation)
    		case HasMany:
    			schema.Relationships.HasMany = append(schema.Relationships.HasMany, relation)
    		case BelongsTo:
    			schema.Relationships.BelongsTo = append(schema.Relationships.BelongsTo, relation)
    		case Many2Many:
    			schema.Relationships.Many2Many = append(schema.Relationships.Many2Many, relation)
    		}
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 22.4K bytes
    - Viewed (0)
  7. schema/field.go

    				ef.BindNames = append([]string{fieldStruct.Name}, ef.BindNames...)
    				if _, ok := field.TagSettings["EMBEDDED"]; ok || !fieldStruct.Anonymous {
    					ef.EmbeddedBindNames = append([]string{fieldStruct.Name}, ef.EmbeddedBindNames...)
    				}
    				// index is negative means is pointer
    				if field.FieldType.Kind() == reflect.Struct {
    					ef.StructField.Index = append([]int{fieldStruct.Index[0]}, ef.StructField.Index...)
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 32K bytes
    - Viewed (1)
  8. tests/query_test.go

    		t.Errorf("No error should returns, but got %v", err)
    	}
    
    	AssertEqual(t, p, p2)
    
    	if err := DB.First(&p, "id = ?", p2.ID).Error; err != nil {
    		t.Errorf("No error should happen when querying with customized type for primary key, got err %v", err)
    	}
    
    	AssertEqual(t, p, p2)
    }
    
    func TestStringPrimaryKeyForNumericValueStartingWithZero(t *testing.T) {
    	type AddressByZipCode struct {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Apr 25 12:22:53 GMT 2024
    - 49.8K bytes
    - Viewed (0)
Back to top