-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.6.0
-
Component/s: API
-
None
-
Fully Compatible
As far as I can tell, there is no easy way to execute a command like db.collection.find().min(lbound).max(ubound). Since I need those, I'm forced to choose between executing the "find" command manually with RunCommand() (and then deal with parsing the response, managing the cursor, and deserializing the results myself) or maintaining a custom version of the driver.
Please add support for the missing .min() and .max() functions. I suggest syntax like:
collection.Find(...).Min(lbound).Max(ubound) to maintain parity with mongoDB,
or
collection.Find(...).Bound(lbound, ubound) to avoid potential confusion with min/max aggregates,
or, if you think they're too obscure to belong on the fluent interface, they could be added to FilterOptionsBase.
I'll note that min() and max() are not equivalent to (and can't be replaced by) a corresponding range filter on the index key because the filter is subject to type bracketing while min() and max() are not.
See:
https://docs.mongodb.com/manual/reference/method/cursor.min/index.html
https://docs.mongodb.com/manual/reference/method/cursor.max/index.html
- duplicates
-
CSHARP-1896 Support deprecated "modifiers" FindOption in CRUD API
- Closed