Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for FindInBatches (0.08 sec)

  1. tests/query_test.go

    		return nil
    	}); result.Error != nil || result.RowsAffected != 5 {
    		t.Errorf("Failed to batch find, got error %v, rows affected: %v", result.Error, result.RowsAffected)
    	}
    
    	var sub2 []User
    	// only offset
    	if result := DB.Offset(3).Where("name = ?", users[0].Name).FindInBatches(&sub2, 2, func(tx *gorm.DB, batch int) error {
    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