IGNITE-18084 .NET: LINQ: Async materialization#1495
Merged
Conversation
isapego
approved these changes
Jan 5, 2023
isapego
left a comment
Contributor
There was a problem hiding this comment.
Overall looks good. Left one minor comment.
Co-authored-by: Igor Sapego <isapego@apache.org>
… always goes over the network
maxzhuravkov
pushed a commit
to gridgain/apache-ignite-3
that referenced
this pull request
Mar 18, 2023
Add methods to materialize LINQ results (execute query and fetch rows) asynchronously. Standard `System.Linq.Queryable` provides only synchronous methods to retrieve results: `ToList`, `First`, `Count`, etc. However, underlying Ignite SQL API is asynchronous, so those built-in methods lead to unnecessary blocking. For every built-in method we provide an async counterpart with the same signature. Inspired by EF Core [EntityFrameworkQueryableExtensions](https://learn.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.entityframeworkqueryableextensions?view=efcore-7.0). Full list of added public APIs: * `IResultSet.ToDictionaryAsync` (works for raw SQL and LINQ) * `IResultSet.CollectAsync` (works for raw SQL and LINQ) * `IQueryable<T>.AsAsyncEnumerable` * `IQueryable<T>.AnyAsync` * `IQueryable<T>.AllAsync` * `IQueryable<T>.AverageAsync` * `IQueryable<T>.CountAsync` * `IQueryable<T>.LongCountAsync` * `IQueryable<T>.FirstAsync` * `IQueryable<T>.FirstOrDefaultAsync` * `IQueryable<T>.SingleAsync` * `IQueryable<T>.SingleOrDerfaultAsync` * `IQueryable<T>.MinAsync` * `IQueryable<T>.MaxAsync` * `IQueryable<T>.SumAsync` * `IQueryable<T>.ToListAsync` * `IQueryable<T>.DictionaryAsync` * `IQueryable<T>.ToQueryString`
maxzhuravkov
pushed a commit
to gridgain/apache-ignite-3
that referenced
this pull request
Apr 19, 2023
Add methods to materialize LINQ results (execute query and fetch rows) asynchronously. Standard `System.Linq.Queryable` provides only synchronous methods to retrieve results: `ToList`, `First`, `Count`, etc. However, underlying Ignite SQL API is asynchronous, so those built-in methods lead to unnecessary blocking. For every built-in method we provide an async counterpart with the same signature. Inspired by EF Core [EntityFrameworkQueryableExtensions](https://learn.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.entityframeworkqueryableextensions?view=efcore-7.0). Full list of added public APIs: * `IResultSet.ToDictionaryAsync` (works for raw SQL and LINQ) * `IResultSet.CollectAsync` (works for raw SQL and LINQ) * `IQueryable<T>.AsAsyncEnumerable` * `IQueryable<T>.AnyAsync` * `IQueryable<T>.AllAsync` * `IQueryable<T>.AverageAsync` * `IQueryable<T>.CountAsync` * `IQueryable<T>.LongCountAsync` * `IQueryable<T>.FirstAsync` * `IQueryable<T>.FirstOrDefaultAsync` * `IQueryable<T>.SingleAsync` * `IQueryable<T>.SingleOrDerfaultAsync` * `IQueryable<T>.MinAsync` * `IQueryable<T>.MaxAsync` * `IQueryable<T>.SumAsync` * `IQueryable<T>.ToListAsync` * `IQueryable<T>.DictionaryAsync` * `IQueryable<T>.ToQueryString`
isapego
pushed a commit
to isapego/ignite-3
that referenced
this pull request
Dec 26, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add methods to materialize LINQ results (execute query and fetch rows) asynchronously.
Standard
System.Linq.Queryableprovides only synchronous methods to retrieve results:ToList,First,Count, etc. However, underlying Ignite SQL API is asynchronous, so those built-in methods lead to unnecessary blocking. For every built-in method we provide an async counterpart with the same signature.Inspired by EF Core EntityFrameworkQueryableExtensions.
Full list of added public APIs:
IResultSet.ToDictionaryAsync(works for raw SQL and LINQ)IResultSet.CollectAsync(works for raw SQL and LINQ)IQueryable<T>.AsAsyncEnumerableIQueryable<T>.AnyAsyncIQueryable<T>.AllAsyncIQueryable<T>.AverageAsyncIQueryable<T>.CountAsyncIQueryable<T>.LongCountAsyncIQueryable<T>.FirstAsyncIQueryable<T>.FirstOrDefaultAsyncIQueryable<T>.SingleAsyncIQueryable<T>.SingleOrDerfaultAsyncIQueryable<T>.MinAsyncIQueryable<T>.MaxAsyncIQueryable<T>.SumAsyncIQueryable<T>.ToListAsyncIQueryable<T>.DictionaryAsyncIQueryable<T>.ToQueryString