JasperFx / marten

.NET Transactional Document DB and Event Store on PostgreSQL
https://martendb.io
MIT License
2.75k stars 429 forks source link

Make ToAsyncEnumerable() set the QueryStatistics.TotalResult #3218

Closed e-tobi closed 2 months ago

e-tobi commented 2 months ago

TotalResult will not be available before enumeration of the result started. But I think, this might still be useful for providing progress information when iterating over a large result set.

This is the easiest / least "intrusive" implementation I could come up with.