11using System ;
22using System . Collections . Generic ;
33using System . Data ;
4+ using System . Threading ;
45using System . Threading . Tasks ;
56
67namespace SqlKata . Execution
@@ -71,9 +72,9 @@ public PaginationResult<T> Next(IDbTransaction transaction = null, int? timeout
7172 return this . Query . Paginate < T > ( Page + 1 , PerPage , transaction , timeout ) ;
7273 }
7374
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 )
7576 {
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 ) ;
7778 }
7879
7980 public Query PreviousQuery ( )
@@ -86,9 +87,9 @@ public PaginationResult<T> Previous(IDbTransaction transaction = null, int? time
8687 return this . Query . Paginate < T > ( Page - 1 , PerPage , transaction , timeout ) ;
8788 }
8889
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 )
9091 {
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 ) ;
9293 }
9394
9495 public PaginationIterator < T > Each
0 commit comments