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

Impove the BCON_APPEND_CTX() function for being called multiple times to add multiple values to same bson array

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • 1.9.1, 1.9.2, 1.9.3
    • libbson
    • linux
    • Minor Change

    Description

      While adding elements in a bson array, you should call BCON_APPEND_CTX() , but all elements must be placed in the parameter position at once,just like BCON_APPEND_CTX(query, &ctx, "$each", "[", BCON_INT64((int64_t)num[0]), BCON_INT64((int64_t)num[1]), BCON_INT64((int64_t)num[2]) "]") ; However, the number of array elements is unknown, it's difficult to add all elements in the bson array for just calling BCON_APPEND_CTX() one time;
      It's need for me to call Call BCON_APPEND_CTX multiple times to add multiple values to the same bson array.

      Attachments

        1. bcon.c
          27 kB

        Activity

          People

            Unassigned Unassigned
            haveTryTwo liuzhongchao
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: