Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for BatchSize (0.19 sec)

  1. tests/query_test.go

    	}
    
    	targetUsers := users[3:8]
    	for i := 0; i < len(targetUsers); i++ {
    		AssertEqual(t, results[i], targetUsers[i])
    	}
    
    	var sub1 []User
    	// limit < batchSize
    	if result := DB.Limit(5).Where("name = ?", users[0].Name).FindInBatches(&sub1, 10, func(tx *gorm.DB, batch int) error {
    		return nil
    	}); result.Error != nil || result.RowsAffected != 5 {
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Mon Jun 24 09:42:59 UTC 2024
    - 50.4K bytes
    - Viewed (0)
Back to top