-
Type: New Feature
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 1.2.0
-
Component/s: None
-
None
Added new mongoc_bulk_write_flags_t "flags" which replaces the existing "ordered" field in the mongoc_bulk_operation_t (private) struct.
This new struct contains various "bulk write" (e.g. "command write API") options.
Currently these options are:
- ordered (bool)
- bypass_document_validation (enum)
typedef enum { MONGOC_BYPASS_DOCUMENT_VALIDATION_FALSE = 0, MONGOC_BYPASS_DOCUMENT_VALIDATION_TRUE = 1 << 0, MONGOC_BYPASS_DOCUMENT_VALIDATION_DEFAULT = 1 << 1, } mongoc_write_bypass_document_validation_t; struct _mongoc_bulk_write_flags_t { bool ordered; mongoc_write_bypass_document_validation_t bypass_document_validation; };
Added new functions:
mongoc_bulk_operation_set_bypass_document_validation (mongoc_bulk_operation_t *bulk, bool bypass);
mongoc_bulk_operation_set_flags (mongoc_bulk_write_operation_t *bulk, mongoc_bulk_write_flags_t flags);
When creating a new mongoc_bulk_write_flags_t it SHOULD be initialized using the MONGOC_BULK_WRITE_FLAGS_INIT macro like so:
mongoc_bulk_write_flags_t write_flags = MONGOC_BULK_WRITE_FLAGS_INIT;
Which initializes the flags as
ordered = true; bypass_document_validation = server default;
When user explicitly passes bypass_document_validation it will be sent to the server – irregardless of its wire protocol version.
- is depended on by
-
CXX-690 Support bypassDocumentValidation
- Closed
-
DRIVERS-250 Support bypassDocumentValidation
- Closed
-
PHPC-443 Support bypassDocumentValidation option for insert and update commands
- Closed
- is related to
-
PHPC-495 Upgrade bundled libbson and libmongoc to 1.3.0
- Closed
-
CDRIVER-945 mongoc_collection_find_and_modify_with_opts () builder
- Closed
- related to
-
CDRIVER-946 unimplemented method mongoc_bulk_operation_set_flags
- Closed
-
CDRIVER-957 w=0 with bypassDocumentValidation set must error
- Closed
-
CDRIVER-971 Export mongoc_bulk_operation_set_bypass_document_validation and mongoc_bulk_operation_set_flags
- Closed
-
CDRIVER-1009 Document mongoc_bulk_operation_set_bypass_document_validation
- Closed
-
CDRIVER-1012 Document aggregate and bypassDocumentValidation with $out
- Closed