Uploaded image for project: 'C++ Driver'
  1. C++ Driver
  2. CXX-1499

Don't access bson_iter_t internals

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.4.0
    • Affects Version/s: None
    • Component/s: None
    • None

      We current access the internals of the bson_iter_t structure (see CDRIVER-2467 for details). Once the C driver provides a mechanism to address this, use it.]

      Let's add a libbson function bson_iter_keylen which returns the length of the key. This is already known, it's something like "key - d1". The C++ iterator can store this length before destroying the bson_iter_t, then pass it back into a new libbson function like bson_iter_init_with_data. That will end up doing only one key-length calculation per iterator increment, whereas right now the C++ Driver does two.

            Assignee:
            kevin.albertson@mongodb.com Kevin Albertson
            Reporter:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: