Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for scope (0.14 sec)

  1. tests/count_test.go

    	sort.SliceStable(users, func(i, j int) bool {
    		return strings.Compare(users[i].Name, users[j].Name) < 0
    	})
    
    	AssertEqual(t, users, expects)
    
    	var count9 int64
    	if err := DB.Scopes(func(tx *gorm.DB) *gorm.DB {
    		return tx.Table("users")
    	}).Where("name in ?", []string{user1.Name, user2.Name, user3.Name}).Count(&count9).Find(&users).Error; err != nil || count9 != 3 {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Oct 30 09:15:49 GMT 2023
    - 6.9K bytes
    - Viewed (0)
Back to top