Azure-docs: Azure.Cosmos sdk4 - GetItemLinqQueryable?

Created on 18 Apr 2020  Â·  10Comments  Â·  Source: MicrosoftDocs/azure-docs

When will GetItemLinqQueryable (or equivalent LINQ based query) be available in sdk4?


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Pri2 cosmos-dsvc cosmosdb-sqsubsvc cxp product-question review-team-triage triaged

All 10 comments

@efreeman518, thank you for reaching out. We are looking into this and would get back to you soon on this thread.

V4 preview is using AsyncEnumerable and async iterators. This is in sync with the Azure Core SDKs and we need to follow their guidelines for V4. Linq provider is not async and thus not included at this point until we have a clear guideline from the Azure Core SDK https://github.com/Azure/azure-sdk-for-net/blob/master/README.md

@efreeman518 We will proceed to close this issue now.
If there are further questions regarding this matter, please comment and we will gladly continue the discussion.

Where can I review proposals/plans for async Linq, if they exist? Can we utilize Rx?

@lightw8 Any questions should be done to the Azure Core SDK: https://github.com/Azure/azure-sdk-for-net/

I don't understand whats wrong with the approach in v3 where you would formulate your linq query and pass it to the GetItemQueryIterator method with queryable.ToQueryDefinition().QueryText;

I just don't want to write SQL and it seems like such a non issue to do

EF Core and System.Linq.Async have no issue with combining iqueryable with async. Why do you @ealsur ? Also what does being able to build queries based on your model without magic strings have to do with the question of async vs sync?

@onionhammer I don't have any issues, what I'm saying is that the API surface of the V4 SDK (which is currently a preview experimental SDK) is governed by the Azure Core SDK guidelines, which currently have no guidelines for Linq support, and that is the reason V4 SDK has no Linq. You can use Linq on V3 SDK which is the current SDK for production.

@ealsur Then perhaps the linq-to-cosmos query translation should be broken into a separate package?

That could be a possibility based on the review of the Azure Core SDK board, yes. V4 is still a long ways off, when we get closer we'll review the options we are provided. In the meantime, please use V3 SDK for any production apps.

Was this page helpful?
0 / 5 - 0 ratings