Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 37 for Vriens (0.22 sec)

  1. tests/associations_many2many_test.go

    	// Append
    	friend := *GetUser("friend", Config{})
    
    	if err := DB.Model(&user2).Association("Friends").Append(&friend); err != nil {
    		t.Fatalf("Error happened when append account, got %v", err)
    	}
    
    	user.Friends = append(user.Friends, &friend)
    	CheckUser(t, user2, user)
    
    	AssertAssociationCount(t, user, "Friends", 3, "AfterAppend")
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Sat Jun 10 13:05:19 GMT 2023
    - 13.2K bytes
    - Viewed (0)
  2. tests/update_many2many_test.go

    		DB.Create(&lang)
    	}
    	user.Friends = []*User{{Name: "friend-1"}, {Name: "friend-2"}}
    
    	if err := DB.Save(&user).Error; err != nil {
    		t.Fatalf("errors happened when update: %v", err)
    	}
    
    	var user2 User
    	DB.Preload("Languages").Preload("Friends").Find(&user2, "id = ?", user.ID)
    	CheckUser(t, user2, user)
    
    	for idx := range user.Friends {
    		user.Friends[idx].Name += "new"
    	}
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Jan 06 07:02:53 GMT 2022
    - 1.3K bytes
    - Viewed (0)
  3. tests/helper_test.go

    		}
    	})
    
    	t.Run("Friends", func(t *testing.T) {
    		if len(user.Friends) != len(expect.Friends) {
    			t.Fatalf("Friends should equal, expect: %v, got %v", len(expect.Friends), len(user.Friends))
    		}
    
    		sort.Slice(user.Friends, func(i, j int) bool {
    			return user.Friends[i].ID > user.Friends[j].ID
    		})
    
    		sort.Slice(expect.Friends, func(i, j int) bool {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Mar 19 03:50:28 GMT 2024
    - 8K bytes
    - Viewed (0)
  4. tests/tests_test.go

    	rand.Seed(time.Now().UnixNano())
    	rand.Shuffle(len(allModels), func(i, j int) { allModels[i], allModels[j] = allModels[j], allModels[i] })
    
    	DB.Migrator().DropTable("user_friends", "user_speaks")
    
    	if err = DB.Migrator().DropTable(allModels...); err != nil {
    		log.Printf("Failed to drop table, got error %v\n", err)
    		os.Exit(1)
    	}
    
    	if err = DB.AutoMigrate(allModels...); err != nil {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Dec 15 08:36:08 GMT 2023
    - 3.3K bytes
    - Viewed (1)
  5. internal/dsync/drwmutex.go

    		Timeout: drwMutexInfinite,
    	})
    }
    
    // Options lock options.
    type Options struct {
    	Timeout       time.Duration
    	RetryInterval time.Duration
    }
    
    // GetLock tries to get a write lock on dm before the timeout elapses.
    //
    // If the lock is already in use, the calling go routine
    // blocks until either the mutex becomes available and return success or
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 19.7K bytes
    - Viewed (0)
  6. schema/schema_test.go

    			References: []Reference{{"ID", "User", "UserID", "UserSpeak", "", true}, {"Code", "Language", "LanguageCode", "UserSpeak", "", false}},
    		},
    		{
    			Name: "Friends", Type: schema.Many2Many, Schema: "User", FieldSchema: "User",
    			JoinTable: JoinTable{Name: "user_friends", Table: "user_friends", Fields: []schema.Field{
    				{
    					Name: "UserID", DBName: "user_id", BindNames: []string{"UserID"}, DataType: schema.Uint,
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Dec 15 08:31:23 GMT 2023
    - 12.9K bytes
    - Viewed (0)
  7. tests/update_test.go

    	result.Friends = append(user.Friends, result.Friends...)
    
    	sort.Slice(result.Pets, func(i, j int) bool {
    		return result.Pets[i].ID < result.Pets[j].ID
    	})
    	sort.Slice(result.Team, func(i, j int) bool {
    		return result.Team[i].ID < result.Team[j].ID
    	})
    	sort.Slice(result.Friends, func(i, j int) bool {
    		return result.Friends[i].ID < result.Friends[j].ID
    	})
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Dec 04 03:50:58 GMT 2023
    - 30.3K bytes
    - Viewed (0)
  8. internal/kms/kes.go

    // APIs retrieves a list of supported API endpoints
    func (c *kesClient) APIs(ctx context.Context) ([]kes.API, error) {
    	c.lock.RLock()
    	defer c.lock.RUnlock()
    
    	return c.client.APIs(ctx)
    }
    
    // CreateKey tries to create a new key at the KMS with the
    // given key ID.
    //
    // If the a key with the same keyID already exists then
    // CreateKey returns kes.ErrKeyExists.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Apr 16 15:43:39 GMT 2024
    - 14.9K bytes
    - Viewed (0)
  9. tests/create_test.go

    		*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}),
    		*GetUser("bulk_7", Config{Account: true, Pets: 1, Toys: 3, Company: true, Manager: true, Team: 4, Languages: 3, Friends: 1}),
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Mar 19 03:50:28 GMT 2024
    - 26.4K bytes
    - Viewed (0)
  10. src/bufio/bufio.go

    	}
    
    	return
    }
    
    // ReadLine is a low-level line-reading primitive. Most callers should use
    // [Reader.ReadBytes]('\n') or [Reader.ReadString]('\n') instead or use a [Scanner].
    //
    // ReadLine tries to return a single line, not including the end-of-line bytes.
    // If the line was too long for the buffer then isPrefix is set and the
    // beginning of the line is returned. The rest of the line will be returned
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Oct 12 14:39:08 GMT 2023
    - 21.8K bytes
    - Viewed (0)
Back to top