|
Write Concern abstraction SYNOPSISmongoc_write_concern_t tells the driver what level of acknowledgement to await from the server. The default, MONGOC_WRITE_CONCERN_W_DEFAULT, is right for the great majority of applications. You can specify a write concern on connection objects, database objects, collection objects, or per-operation. Data-modifying operations typically use the write concern of the object they operate on, and check the server response for a write concern error or write concern timeout. For example, mongoc_collection_drop_index() uses the collection's write concern, and a write concern error or timeout in the response is considered a failure. Exceptions to this principle are the generic command functions:
These generic command functions do not automatically apply a write concern, and they do not check the server response for a write concern error or write concern timeout. See Write Concern on the MongoDB website for more information. WRITE CONCERN LEVELSSet the write concern level with mongoc_write_concern_set_w().
DEPRECATIONSThe write concern MONGOC_WRITE_CONCERN_W_ERRORS_IGNORED (value -1) is a deprecated synonym for MONGOC_WRITE_CONCERN_W_UNACKNOWLEDGED (value 0), and will be removed in the next major release. mongoc_write_concern_set_fsync() is deprecated. AUTHORMongoDB, Inc COPYRIGHT2009-present, MongoDB, Inc.
|