Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 36 of 36 for Account (0.14 sec)

  1. tests/associations_many2many_test.go

    	}
    
    	count := 3
    
    	var languages []Language
    	for i := 0; i < count; i++ {
    		language := Language{Code: fmt.Sprintf("consurrent %d", i)}
    		db.Create(&language)
    		languages = append(languages, language)
    	}
    
    	user := User{}
    	db.Create(&user)
    	db.Preload("Languages").FirstOrCreate(&user)
    
    	var wg sync.WaitGroup
    	for i := 0; i < count; i++ {
    		wg.Add(1)
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sat Jun 10 13:05:19 GMT 2023
    - 13.2K bytes
    - Viewed (0)
  2. tests/query_test.go

    	}
    
    	if totalBatch != 6 {
    		t.Errorf("incorrect total batch, expects: %v, got %v", 6, totalBatch)
    	}
    
    	var count int64
    	DB.Model(&User{}).Where("name = ?", "find_in_batches_new").Count(&count)
    	if count != 6 {
    		t.Errorf("incorrect count after update, expects: %v, got %v", 6, count)
    	}
    }
    
    func TestFindInBatchesWithOffsetLimit(t *testing.T) {
    	users := []User{
    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)
  3. tests/tests_all.sh

        then
          GORM_DIALECT=${dialect} go test -race -count=1 ./...
          if [ -d tests ]
          then
            cd tests
            GORM_DIALECT=${dialect} go test -race -count=1 ./...
            cd ..
          fi
        else
          GORM_DIALECT=${dialect} go test -race -count=1 -v ./...
          if [ -d tests ]
          then
            cd tests
            GORM_DIALECT=${dialect} go test -race -count=1 -v ./...
            cd ..
          fi
        fi
      fi
    Shell Script
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Wed Feb 08 08:29:09 GMT 2023
    - 1.6K bytes
    - Viewed (0)
  4. tests/non_std_test.go

    		t.Errorf("UpdatedAt should be updated")
    	}
    
    	var animals []Animal
    	DB.Find(&animals)
    	if count := DB.Model(Animal{}).Where("1=1").Update("CreatedAt", time.Now().Add(2*time.Hour)).RowsAffected; count != int64(len(animals)) {
    		t.Error("RowsAffected should be correct when do batch update")
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Jan 06 07:02:53 GMT 2022
    - 1.9K bytes
    - Viewed (0)
  5. tests/sql_builder_test.go

    	if err != nil {
    		t.Errorf("Not error should happen, got %v", err)
    	}
    
    	count := 0
    	for rows.Next() {
    		var name string
    		var age int64
    		rows.Scan(&name, &age)
    		count++
    	}
    
    	if count != 2 {
    		t.Errorf("Should found two records")
    	}
    }
    
    func TestRaw(t *testing.T) {
    	user1 := User{Name: "ExecRawSqlUser1", Age: 1}
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 16.7K bytes
    - Viewed (0)
  6. association.go

    	return association.Error
    }
    
    func (association *Association) Clear() error {
    	return association.Replace()
    }
    
    func (association *Association) Count() (count int64) {
    	if association.Error == nil {
    		association.Error = association.buildCondition().Count(&count).Error
    	}
    	return
    }
    
    type assignBack struct {
    	Source reflect.Value
    	Index  int
    	Dest   reflect.Value
    }
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu May 04 11:30:45 GMT 2023
    - 21.2K bytes
    - Viewed (0)
Back to top