-
Notifications
You must be signed in to change notification settings - Fork 495
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
Add support for IAsyncEnumerable<T> #903
Comments
We are working on this at the moment 😄 |
Awesome! |
@thomaslevesque See the V4 (preview) package https://docs.microsoft.com/en-us/azure/cosmos-db/create-sql-api-dotnet-v4#query-the-items |
Cool, thanks! |
@ealsur , I just tried this with the latest version of the Cosmos DB API (3.15.2) on .NET Core 3.1 and There is no 4.0 preview package. |
The 4.0 preview package can be found here: https://www.nuget.org/packages/Azure.Cosmos |
Indeed. Honestly, I'm not sure how we're supposed to guess that.
I think I discovered the new package by accident in an article. There's almost no chance a new user will find it if they end up on this repo. |
Is there an anticipated release date for the v4 SDK? It looks like the last preview came out almost a year and a half ago. Thanks for any updates! |
Hello, is there any ETA for this ? It look like the v4 is abandon since 2 year, is there any reason for this ? |
See #2976 |
as of the comment #2976 (comment) I'd like to ask to reopen this issue. a feature like this needs to in the sdk, if it's not v4, then in v3, but this is very much needed. Maybe @jcocchi can help with this? |
Any movement on this? |
Is your feature request related to a problem? Please describe.
The API for enumerating query results isn't great, because it forces the user to be aware of the fact that the results are fetched page by page:
Describe the solution you'd like
The
FeedIterator<T>
API is useful, because it gives you more information (e.g. request charge), but in most cases the user just wants the results, so it would be nice to have a higher level abstraction. TheIAsyncEnumerable<T>
interface seems perfect for this.There could be an
AsAsyncEnumerable
extension method like this:The consuming code would be simplified to this:
Describe alternatives you've considered
N/A
Additional context
The
await foreach
feature was introduced in C# 8, so this would only be useful to people already using C# 8.However, the
Microsoft.Bcl.AsyncInterfaces
package is compatible with netstandard2.0 and net461, so it wouldn't require running .NET Core 3.The text was updated successfully, but these errors were encountered: