.\" Man page generated from reStructuredText. . . .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 .. .TH "MONGOC_COLLECTION_CREATE_BULK_OPERATION_WITH_OPTS" "3" "May 07, 2024" "1.27.1" "libmongoc" .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 .sp .EX mongoc_bulk_operation_t * mongoc_collection_create_bulk_operation_with_opts ( mongoc_collection_t *collection, const bson_t *opts) BSON_GNUC_WARN_UNUSED_RESULT; .EE .UNINDENT .UNINDENT .SH PARAMETERS .INDENT 0.0 .IP \(bu 2 \fBcollection\fP: A \fI\%mongoc_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 \fI\%mongoc_write_concern_t\fP and use \fI\%mongoc_write_concern_append()\fP to add the write concern to \fBopts\fP\&. See the example code for \fI\%mongoc_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 \fI\%mongoc_client_session_t\fP with \fI\%mongoc_client_start_session()\fP\&. You can begin a transaction with \fI\%mongoc_client_session_start_transaction()\fP, optionally with a \fI\%mongoc_transaction_opt_t\fP that overrides the options inherited from \fBcollection\fP, and use \fI\%mongoc_client_session_append()\fP to add the session to \fBopts\fP\&. See the example code for \fI\%mongoc_client_session_t\fP\&. .IP \(bu 2 \fBlet\fP: A BSON document consisting of any number of parameter names, each followed by definitions of constants in the MQL Aggregate Expression language. .IP \(bu 2 \fBcomment\fP: A \fI\%bson_value_t\fP specifying the comment to attach to this command. The comment will appear in log messages, profiler output, and currentOp output. Requires MongoDB 4.4 or later. .UNINDENT .SH DESCRIPTION .sp This function shall begin a new bulk operation. After creating this you may call various functions such as \fI\%mongoc_bulk_operation_update()\fP, \fI\%mongoc_bulk_operation_insert()\fP and others. .sp After calling \fI\%mongoc_bulk_operation_execute()\fP the commands will be executed in as large as batches as reasonable by the client. .SH ERRORS .sp Errors are propagated when executing the bulk operation. .SH RETURNS .sp A newly allocated \fI\%mongoc_bulk_operation_t\fP that should be freed with \fI\%mongoc_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 .sp \fBSEE ALSO:\fP .INDENT 0.0 .INDENT 3.5 .nf \fI\%Bulk Write Operations\fP .fi .sp .nf \fI\%mongoc_bulk_operation_t\fP .fi .sp .UNINDENT .UNINDENT .SH AUTHOR MongoDB, Inc .SH COPYRIGHT 2017-present, MongoDB, Inc .\" Generated by docutils manpage writer. .