[CSHARP-4203] Any and AnyAsync do not have IFindFluent extensions to project and limit results. Created: 09/Jun/22  Updated: 28/Oct/23  Resolved: 14/Jun/22

Status: Closed
Project: C# Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 2.17.0

Type: Improvement Priority: Minor - P4
Reporter: Matthew DeJonge Assignee: Boris Dogadov
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

First, Single, and all their variants have extension methods on IFindFluent that internally call Limit. This improves performance of some queries and has no impact on the rest. Any and AnyAsync do not have similar extension methods. Because of that I have to add a projection and limit in my client code. Otherwise I would see performance impacts. It would be better if this functionality was built in. Other people using the driver wouldn't necessarily know to do this unless they look at the source code.



 Comments   
Comment by Boris Dogadov [ 14/Jun/22 ]

Thank you for your contribution mhdejong@umich.edu!

Comment by Githook User [ 14/Jun/22 ]

Author:

{'name': 'Matthew DeJonge', 'email': 'mhdejong@umich.edu', 'username': 'mhdejonge'}

Message: CSHARP-4203: IFindFluentExtensions for Any and AnyAsync (#817)

Co-authored-by: Matthew DeJonge <mdejonge@terryberry.com>
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/1983d9b4521694c2fd25038b2f3a6eb4697837ce

Comment by Matthew DeJonge [ 09/Jun/22 ]

Pull Request

Generated at Wed Feb 07 21:47:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.