Details
-
Improvement
-
Resolution: Won't Fix
-
Major - P3
-
None
-
None
-
None
-
None
Description
There is an API called mongoc_gridfs_find_with_opts() which counters mongoc_collection_find_with_opts() for fetching files from a GridFS as opposed to documents from a collection. And there is a useful alternative called mongoc_gridfs_find_one_with_opts() to fetch just one matching file. It seems like a helpful wrapper, and a user legitimately anticipates there is a sibling for a collection, but there's none...
As a proposal of a new useful feature and a measure to eliminate API inconsistencies, a new API can be implemented to help fetching one result from a collection much like the aforementioned mongoc_gridfs_find_one_with_opts().
Taking into account the proposed optimizations for mongoc_gridfs_find_one_with_opts(), the new API should be fairly easy to implement. Please refer to: https://jira.mongodb.org/browse/CDRIVER-2026 for details.