Add mongoc_collection_find_one_with_opts()

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            A. Jesse Jiryu Davis
            Reporter:
            Arseny Vakhrushev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: