Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,14 @@ ValueTask<IPageQueryResult<TItem>> PageAsync(
/// </summary>
/// <param name="predicate">A filter criteria for the paging operation, if null it will get all <see cref="IItem"/>s</param>
/// <param name="limit">The limit of how many items to yield. Defaults to <c>1,000</c>.</param>
/// <param name="pageSize">The size of the page to return from cosmos db.</param>
/// <param name="cancellationToken">The optional <see cref="CancellationToken"/> used to </param>
/// <returns>An <see cref="IAsyncEnumerable{T}"/> where <c>T</c> is <typeparamref name="TItem"/>.</returns>
/// <remarks>This method makes use of Cosmos DB's continuation tokens for efficient, cost effective paging utilizing low RUs</remarks>
async IAsyncEnumerable<TItem> PageAsync(
Expression<Func<TItem, bool>>? predicate = null,
int limit = 1_000,
int pageSize = 25,
[EnumeratorCancellation] CancellationToken cancellationToken = default)
{
var collected = 0;
Expand All @@ -245,7 +247,7 @@ async IAsyncEnumerable<TItem> PageAsync(
IPageQueryResult<TItem> page = await PageAsync(
predicate,
pageNumber: ++ currentPage,
25,
pageSize,
returnTotal: false,
cancellationToken);

Expand Down