1
1
using System ;
2
2
using System . Collections . Generic ;
3
3
using System . Data ;
4
+ using System . Threading ;
4
5
using System . Threading . Tasks ;
5
6
6
7
namespace SqlKata . Execution
@@ -71,9 +72,9 @@ public PaginationResult<T> Next(IDbTransaction transaction = null, int? timeout
71
72
return this . Query . Paginate < T > ( Page + 1 , PerPage , transaction , timeout ) ;
72
73
}
73
74
74
- public async Task < PaginationResult < T > > NextAsync ( IDbTransaction transaction = null , int ? timeout = null )
75
+ public async Task < PaginationResult < T > > NextAsync ( IDbTransaction transaction = null , int ? timeout = null , CancellationToken cancellationToken = default )
75
76
{
76
- return await this . Query . PaginateAsync < T > ( Page + 1 , PerPage , transaction , timeout ) ;
77
+ return await this . Query . PaginateAsync < T > ( Page + 1 , PerPage , transaction , timeout , cancellationToken ) ;
77
78
}
78
79
79
80
public Query PreviousQuery ( )
@@ -86,9 +87,9 @@ public PaginationResult<T> Previous(IDbTransaction transaction = null, int? time
86
87
return this . Query . Paginate < T > ( Page - 1 , PerPage , transaction , timeout ) ;
87
88
}
88
89
89
- public async Task < PaginationResult < T > > PreviousAsync ( IDbTransaction transaction = null , int ? timeout = null )
90
+ public async Task < PaginationResult < T > > PreviousAsync ( IDbTransaction transaction = null , int ? timeout = null , CancellationToken cancellationToken = default )
90
91
{
91
- return await this . Query . PaginateAsync < T > ( Page - 1 , PerPage , transaction , timeout ) ;
92
+ return await this . Query . PaginateAsync < T > ( Page - 1 , PerPage , transaction , timeout , cancellationToken ) ;
92
93
}
93
94
94
95
public PaginationIterator < T > Each
0 commit comments