Extend bson_array_builder_t API

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Unknown
    • 2.3.0
    • Affects Version/s: None
    • Component/s: None
    • Not Needed
    • None
    • Fully Compatible
    • C Drivers
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      Proposal

      Add API to the bson_array_builder for more feature parity with the bson_append API. Add macros that compute the string length:

      • BSON_ARRAY_BUILDER_APPEND_UTF8
      • BSON_ARRAY_BUILDER_APPEND_SYMBOL

      Background & Motivaiton

      CDRIVER-6180 plans to deprecate unsafe API to build arrays. Adding helpers to the bson_array_builder_t may ease migration. For example, the BSON_APPEND_UTF8 macro allows excluding the length argument. The bson_array_builder_append_utf8 has no analogous macro.

            Assignee:
            Kevin Albertson
            Reporter:
            Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: