-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement Cosmos pagination (#34103)
Closes #24513
- Loading branch information
Showing
16 changed files
with
896 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System.Diagnostics.CodeAnalysis; | ||
|
||
// ReSharper disable once CheckNamespace | ||
namespace Microsoft.EntityFrameworkCore; | ||
|
||
/// <summary> | ||
/// A single page of results returned from a user query; can be used to paginate through long result-sets. | ||
/// Returned by <see cref="CosmosQueryableExtensions.ToPageAsync{T}" />. | ||
/// </summary> | ||
/// <param name="values">The values contained in this page.</param> | ||
/// <param name="continuationToken"> | ||
/// The continuation token for fetching further results from the query. Is <see langword="null" /> or empty when there are no more | ||
/// results. | ||
/// </param> | ||
/// <typeparam name="T">The type of values contained in the page.</typeparam> | ||
[Experimental(EFDiagnostics.PagingExperimental)] | ||
public readonly struct CosmosPage<T>(IReadOnlyList<T> values, string? continuationToken) | ||
{ | ||
/// <summary> | ||
/// The values contained in this page. | ||
/// </summary> | ||
public IReadOnlyList<T> Values { get; } = values; | ||
|
||
/// <summary> | ||
/// The continuation token for fetching further results from the query. Is <see langword="null" /> or empty when there are no more | ||
/// results. | ||
/// </summary> | ||
public string? ContinuationToken { get; } = continuationToken; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.