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

Expose mongoc_cursor_t 'sent' field

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • 1.5.0
    • None
    • libmongoc
    • None

    Description

      I'd like to see mongoc_cursor_t expose the sent field, perhaps via a new function like this:

      bool
      mongoc_cursor_is_sent ( const mongoc_cursor_t *cursor )
      {
         BSON_ASSERT (cursor);
       
         return !!cursor->sent;
      }
      

      This would allow HLL wrappers to determine whether the query has been sent or not, which avoids wrappers having to track this identical information on their end (based on whether mongoc_cursor_next has yet been called). See CXX-1001 and CXX-1100 for context.

      I have no objection to alternate names along the lines of mongoc_cursor_query_sent, mongoc_cursor_has_executed, etc. if mongoc_cursor_is_sent is objectionable.

      Attachments

        Activity

          People

            jesse@mongodb.com A. Jesse Jiryu Davis
            david.golden@mongodb.com David Golden
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: