.\" Man page generated from reStructuredText. . .TH "MONGOC_COLLECTION_CREATE_BULK_OPERATION_WITH_OPTS" "3" "Jun 04, 2021" "1.17.6" "libmongoc" .SH NAME mongoc_collection_create_bulk_operation_with_opts \- mongoc_collection_create_bulk_operation_with_opts() . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C mongoc_bulk_operation_t * mongoc_collection_create_bulk_operation_with_opts ( mongoc_collection_t *collection, const bson_t *opts) BSON_GNUC_WARN_UNUSED_RESULT; .ft P .fi .UNINDENT .UNINDENT .SH PARAMETERS .INDENT 0.0 .IP \(bu 2 \fBcollection\fP: A \fBmongoc_collection_t\fP\&. .UNINDENT .sp \fBopts\fP may be NULL or a BSON document with additional command options: .INDENT 0.0 .IP \(bu 2 \fBwriteConcern\fP: Construct a \fBmongoc_write_concern_t\fP and use \fBmongoc_write_concern_append\fP to add the write concern to \fBopts\fP\&. See the example code for \fBmongoc_client_write_command_with_opts\fP\&. .IP \(bu 2 \fBordered\fP: set to \fBfalse\fP to attempt to insert all documents, continuing after errors. .IP \(bu 2 \fBsessionId\fP: First, construct a \fBmongoc_client_session_t\fP with \fBmongoc_client_start_session\fP\&. You can begin a transaction with \fBmongoc_client_session_start_transaction\fP, optionally with a \fBmongoc_transaction_opt_t\fP that overrides the options inherited from \fBcollection\fP, and use \fBmongoc_client_session_append\fP to add the session to \fBopts\fP\&. See the example code for \fBmongoc_client_session_t\fP\&. .UNINDENT .SH DESCRIPTION .sp This function shall begin a new bulk operation. After creating this you may call various functions such as \fBmongoc_bulk_operation_update()\fP, \fBmongoc_bulk_operation_insert()\fP and others. .sp After calling \fBmongoc_bulk_operation_execute()\fP the commands will be executed in as large as batches as reasonable by the client. .SH SEE ALSO .sp \fBBulk Write Operations\fP .sp \fBmongoc_bulk_operation_t\fP .SH ERRORS .sp Errors are propagated when executing the bulk operation. .SH RETURNS .sp A newly allocated \fBmongoc_bulk_operation_t\fP that should be freed with \fBmongoc_bulk_operation_destroy()\fP when no longer in use. .sp \fBWARNING:\fP .INDENT 0.0 .INDENT 3.5 Failure to handle the result of this function is a programming error. .UNINDENT .UNINDENT .SH AUTHOR MongoDB, Inc .SH COPYRIGHT 2017-present, MongoDB, Inc .\" Generated by docutils manpage writer. .