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

Option to pass bson_validate_flags_t to update/insert functions

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.10.0
    • Affects Version/s: None
    • Component/s: libmongoc
    • None

      There is currently no way of controlling what the insert/update functions check for when validating BSON documents prior to insert/update. For example, a client can not ask the validation function called by mongoc_collection_update() to validate the BSON and tell it to allow empty keys. This can of course be worked around by explicitly calling bson_validate() with the desired flags and then calling insert/update with MONGOC_INSERT/UPDATE_NO_VALIDATE set, but that adds a little bit of complexity and some code clutter to client code. It would be handy to just be able to pass bson_validate_flags_t to the insert/update calls.

            Assignee:
            xiangyu.yao@mongodb.com Xiangyu Yao (Inactive)
            Reporter:
            LarsLundstedt Lars Lundstedt [X]
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: