Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-2027

Add mongoc_collection_find_one_with_opts()

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Major - P3 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.

      Attachments

        Activity

          People

            jesse@mongodb.com A. Jesse Jiryu Davis
            neoxic Arseny Vakhrushev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: