Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 222 for getUses (0.13 sec)

  1. tests/associations_many2many_test.go

    	}
    
    	// Append
    	teams1 := []User{*GetUser("friend-append-1", Config{})}
    	teams2 := []User{}
    	teams3 := []*User{GetUser("friend-append-3-1", Config{}), GetUser("friend-append-3-2", Config{})}
    
    	DB.Model(&users).Association("Team").Append(&teams1, &teams2, &teams3)
    
    	AssertAssociationCount(t, users, "Team", 9, "After Append")
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Sat Jun 10 13:05:19 UTC 2023
    - 13.2K bytes
    - Viewed (0)
  2. tests/transaction_test.go

    		t.Fatalf("Should find saved record")
    	}
    }
    
    func TestNestedTransactionWithBlock(t *testing.T) {
    	var (
    		user  = *GetUser("transaction-nested", Config{})
    		user1 = *GetUser("transaction-nested-1", Config{})
    		user2 = *GetUser("transaction-nested-2", Config{})
    	)
    
    	if err := DB.Transaction(func(tx *gorm.DB) error {
    		tx.Create(&user)
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed May 08 04:07:58 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  3. tests/associations_belongs_to_test.go

    	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{}),
    	)
    	AssertAssociationCount(t, users, "Manager", 3, "After Append")
    
    	if err := DB.Model(&users).Association("Manager").Append(
    		GetUser("manager-slice-belongs-to-test-1", Config{}),
    	).Error; err == nil {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Oct 30 09:15:49 UTC 2023
    - 9.3K bytes
    - Viewed (0)
  4. tests/delete_test.go

    package tests_test
    
    import (
    	"errors"
    	"testing"
    
    	"gorm.io/gorm"
    	"gorm.io/gorm/clause"
    	. "gorm.io/gorm/utils/tests"
    )
    
    func TestDelete(t *testing.T) {
    	users := []User{*GetUser("delete", Config{}), *GetUser("delete", Config{}), *GetUser("delete", Config{})}
    
    	if err := DB.Create(&users).Error; err != nil {
    		t.Errorf("errors happened when create: %v", err)
    	}
    
    	for _, user := range users {
    		if user.ID == 0 {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Tue Oct 10 07:03:34 UTC 2023
    - 9.4K bytes
    - Viewed (0)
  5. tests/distinct_test.go

    import (
    	"regexp"
    	"testing"
    
    	"gorm.io/gorm"
    	. "gorm.io/gorm/utils/tests"
    )
    
    func TestDistinct(t *testing.T) {
    	users := []User{
    		*GetUser("distinct", Config{}),
    		*GetUser("distinct", Config{}),
    		*GetUser("distinct", Config{}),
    		*GetUser("distinct-2", Config{}),
    		*GetUser("distinct-3", Config{}),
    	}
    	users[0].Age = 20
    
    	if err := DB.Create(&users).Error; err != nil {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Thu Jan 06 07:02:53 UTC 2022
    - 2.5K bytes
    - Viewed (0)
  6. tests/create_test.go

    		*GetUser("bulk_4", Config{Account: true, Pets: 3, Toys: 0, Company: false, Manager: true, Team: 0, Languages: 3, Friends: 0}),
    		*GetUser("bulk_5", Config{Account: false, Pets: 0, Toys: 3, Company: true, Manager: false, Team: 1, Languages: 3, Friends: 1}),
    		*GetUser("bulk_6", Config{Account: true, Pets: 4, Toys: 3, Company: false, Manager: true, Team: 1, Languages: 3, Friends: 0}),
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Tue Mar 19 03:50:28 UTC 2024
    - 26.4K bytes
    - Viewed (0)
  7. tests/update_test.go

    	"time"
    
    	"gorm.io/gorm"
    	"gorm.io/gorm/clause"
    	"gorm.io/gorm/utils"
    	. "gorm.io/gorm/utils/tests"
    )
    
    func TestUpdate(t *testing.T) {
    	var (
    		users = []*User{
    			GetUser("update-1", Config{}),
    			GetUser("update-2", Config{}),
    			GetUser("update-3", Config{}),
    		}
    		user          = users[1]
    		lastUpdatedAt time.Time
    	)
    
    	checkUpdatedAtChanged := func(name string, n time.Time) {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Dec 04 03:50:58 UTC 2023
    - 30.3K bytes
    - Viewed (0)
  8. tests/query_test.go

    	users := []User{
    		*GetUser("find_in_batches_with_offset_limit", Config{}),
    		*GetUser("find_in_batches_with_offset_limit", Config{}),
    		*GetUser("find_in_batches_with_offset_limit", Config{}),
    		*GetUser("find_in_batches_with_offset_limit", Config{}),
    		*GetUser("find_in_batches_with_offset_limit", Config{}),
    		*GetUser("find_in_batches_with_offset_limit", Config{}),
    		*GetUser("find_in_batches_with_offset_limit", Config{}),
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed May 08 04:07:58 UTC 2024
    - 49.8K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/transforms/quantize_variables.cc

      Type ref_qtype = nullptr;
      for (auto *var_handle_user : var_handle_op.getResult().getUsers()) {
        auto read_variable_op = dyn_cast_or_null<ReadVariableOp>(var_handle_user);
        if (!read_variable_op) continue;
        for (auto *read_variable_user : read_variable_op.getResult().getUsers()) {
          auto q_op = dyn_cast_or_null<QuantizeOp>(read_variable_user);
          if (!q_op || ref_qtype) continue;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  10. tests/associations_has_many_test.go

    	}
    
    	AssertAssociationCount(t, user2, "Team", 0, "after clear")
    }
    
    func TestHasManyAssociationForSlice(t *testing.T) {
    	users := []User{
    		*GetUser("slice-hasmany-1", Config{Pets: 2}),
    		*GetUser("slice-hasmany-2", Config{Pets: 0}),
    		*GetUser("slice-hasmany-3", Config{Pets: 4}),
    	}
    
    	DB.Create(&users)
    
    	// Count
    	AssertAssociationCount(t, users, "Pets", 6, "")
    
    	// Find
    	var pets []Pet
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 10:49:45 UTC 2024
    - 16K bytes
    - Viewed (0)
Back to top