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

Expose mongoc_cursor_t 'sent' field

    • Type: Icon: New Feature New Feature
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • 1.5.0
    • Affects Version/s: None
    • Component/s: libmongoc
    • None

      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.

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

              Created:
              Updated:
              Resolved: