-
Notifications
You must be signed in to change notification settings - Fork 836
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Method Skip is not supported while querying Cosmos DB #377
Comments
@bchong95 can you please take a look? |
Hi, We currently do not support Skip in SQL queries (and thus we don't support it for LINQ). The workaround is to leverage the Continuation Token retrieved from executing the query. This blog post talks about how this can be achieved: http://www.kevinkuszyk.com/2016/08/19/paging-through-query-results-in-azure-documentdb/ Note that this method still consumes RUs to get to the skip point that you are interested in, so the recommendation is to keep these continuation tokens around for as long as possible. This means that if you have a webpage of paginated results, then you can periodically drain the query from start to finish and save the continuation tokens generated to have skip points. In the future we will support client side skips. Thank you, |
Thanks @bchong95. I am checking this solution out and will get back to you. |
This works. Thanks a lot @bchong95 :-) you can close this issue. |
I have seen on UserVoice that adding Skip and Take are being worked on but I cannot seem to find the github issue for that feature, is there one? thank you |
Starting my pagination journey for CosmosDB today, this does seem alittle painful not having skip. |
Take is already present, you can limit the number or items to get. So we allow pagination only by continuation token, e.g. virtual scroll etc. If you want to jump to page number 1000 - just use more specific query, like date time etc. |
This is a serious shortcoming. Integrating with Material UI pagination seems too hard to be worth it. I have to say, DocumentDB is missing a lot of features that I've taken for granted in RavenDB. Not affiliated with them, just a fan since RavenDB 2.0. |
Here is the UserVoise issue for missing Skip This is really something I expected would be baked in by now. |
Ive done paging fine without Skip. |
Please enlighten us. |
@melzoghbi Can you please reopen this? The issue as stated has not been resolved and I didn't see any open issues this is a duplicate of. Based on the user voice link above, it's being worked on so it would be nice to be able to track it here. |
Any news on this? |
Wow, I'm really surprised this is not yet available. Any plans to work on this feature at all? |
offset/limit (skip/take) is now available in cosmosdb |
skip/take (linq) is being implemented in the new v3 cosmos client |
not sure if it will land in the current v2 @bchong95 ? |
Hi,
While i am trying to implement pagination in the cosmos db query. i am getting this error:
Microsoft.Azure.Documents.Client: Method 'Skip' is not supported.
Here is my C# code:
How would i fix this? Thanks.
The text was updated successfully, but these errors were encountered: