问题
I am going through paging the results returning from CosmosDb and for that I need to understand what uniquely defines the FeedOptions.RequestContinuation
string.
I can make the paging work, so that is not the issue, but its uniqueness is needed for our purposes. What astonished me, for instance, is that the RequestContinuation token is not the same if I perform the following:
-Create data in the emulator for two pocos
-Query items with MaxItemCount
-Get the first RequestContinuation token and store it
-Delete all data (manually in the emulator explorer) and recreating them. The data are exactly the same except for the auto-generated values such as the Id
-Same query with the same MaxItemCount
-Get the token again and store it
The result is that the token last retrieved is not the same as the one in the first method.
Is it possible to have a detailed breakdown on what uniquely defines a RequestContinuation token? Thanks
回答1:
The continuation token should be treated as an opaque string. The actual value depends on the query execution plan, system generated IDs, configurations like page size, degree of parallelism, API version, and more factors. You won't get the same continuation token twice for the same query however.
来源:https://stackoverflow.com/questions/48545528/what-uniquely-defines-the-requestcontinuation-token-in-cosmosdb