Skip to content

Commit acdd436

Browse files
committed
Add a MongoCollection.find(FindOptions) overload.
Avoids accidental misuse of the API, erroneously treating the FindOptions value as the query.
1 parent 7633466 commit acdd436

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mongodb/vibe/db/mongo/collection.d

+2
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,8 @@ struct MongoCollection {
519519
- $(LREF findOne)
520520
*/
521521
MongoCursor!R find(R = Bson)() { return find!R(Bson.emptyObject, FindOptions.init); }
522+
/// ditto
523+
MongoCursor!R find(R = Bson)(FindOptions options) { return find!R(Bson.emptyObject, options); }
522524

523525
///
524526
@safe unittest {

0 commit comments

Comments
 (0)