Skip to content

IAsyncEnumerable on DelayedQuery #170

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

Merged
merged 3 commits into from
Dec 20, 2023
Merged

Conversation

snaumenko-st
Copy link

Introduce IAsyncEnumerable on DelayedQuery to utilize async Session query while asynchronously prefetching data.

@SergeiPavlov
Copy link
Collaborator

SergeiPavlov commented Dec 19, 2023

Looks like it duplicates
DelayedQuery.ExecuteAsync().AsAsyncEnumerable() functionality

Generally we add a new code into DataObject only when it is impossible or difficult to get the the result by existing DO API.

@snaumenko-st
Copy link
Author

We need IAsyncEnumerable implementation here as if it is used inside a Prefetch, which is a fairly common case, it is used as the IEnumerable source and will fall back to a synchronous implementation even in a chain of asynchronous calls. The new unit test shows that behavior.

@SergeiPavlov
Copy link
Collaborator

You are right

@SergeiPavlov
Copy link
Collaborator

@snaumenko-st could you please create a clone of this PR into the Upstream repo https://github.com/dataObjects-net/dataobjects-net ?

@SergeiPavlov SergeiPavlov merged commit 5036833 into master-servicetitan Dec 20, 2023
@SergeiPavlov SergeiPavlov deleted the asyncQueryFix branch December 20, 2023 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants