Elfocrash / Cosmonaut

🌐 A supercharged Azure CosmosDB .NET SDK with ORM support
https://cosmonaut.readthedocs.io
MIT License
341 stars 44 forks source link

Please close #81

Closed allenzhang83 closed 5 years ago

allenzhang83 commented 5 years ago

With the current implementation, I believe there is no way to tell the web fontend client total number of pages without running a full collection scan.

This might be cosmos db limitation, but is there a way to do it?

And the ContinuationToken token approach is the recommended approach. But the user can't jump pages via this approach, right? For example, from page 1 to page 5.

Update: never mind, I spoke to the client, they're happy about the way Cosmonaut works now. Thanks for developing this wonderful library.

Elfocrash commented 5 years ago

@allenzhang83 Thanks for your kind words.

Keep in mind that one of the most requested features of CosmosDB is skip take pagination so whenever they finally implement it (if they do) I will change the WithPagination method to use whatever they choose to go with so you will benefit from the performance without any code changes.

allenzhang83 commented 5 years ago

Thanks a lot!

HMoen commented 5 years ago

Finally! https://docs.microsoft.com/en-us/azure/cosmos-db/how-to-sql-query#OffsetLimitClause

allenzhang83 commented 5 years ago

This is great. Thanks a lot for sharing, will try it out.

On Sun, 12 May 2019, 03:43 Hacinto Moen, notifications@github.com wrote:

Finally! https://docs.microsoft.com/en-us/azure/cosmos-db/how-to-sql-query#OffsetLimitClause

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Elfocrash/Cosmonaut/issues/81#issuecomment-491521741, or mute the thread https://github.com/notifications/unsubscribe-auth/ABVXQWXMSVRN4W7Q4PM75HDPU3SRPANCNFSM4HEEWT5Q .

Elfocrash commented 5 years ago

It's worth pointing out that you can't do cross partition pagination with those keywords. Only same partition ones.