.\" 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_BULK_OPERATION_REPLACE_ONE_WITH_OPTS" "3" "May 07, 2024" "1.27.1" "libmongoc" .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 .sp .EX bool mongoc_bulk_operation_replace_one_with_opts (mongoc_bulk_operation_t *bulk, const bson_t *selector, const bson_t *document, const bson_t *opts, bson_error_t *error); /* OUT */ .EE .UNINDENT .UNINDENT .sp Replace a single document as part of a bulk operation. This only queues the operation. To execute it, call \fI\%mongoc_bulk_operation_execute()\fP\&. .SH PARAMETERS .INDENT 0.0 .IP \(bu 2 \fBbulk\fP: A \fI\%mongoc_bulk_operation_t\fP\&. .IP \(bu 2 \fBselector\fP: A \fI\%bson_t\fP that selects which document to remove. .IP \(bu 2 \fBdocument\fP: A \fI\%bson_t\fP containing the replacement document. .IP \(bu 2 \fBerror\fP: A \fI\%bson_error_t\fP any errors that may have occurred. .UNINDENT .sp \fBopts\fP may be NULL or a BSON document with additional command options: .INDENT 0.0 .IP \(bu 2 \fBvalidate\fP: Construct a bitwise\-or of all desired \fI\%bson_validate_flags_t\fP\&. Set to \fBfalse\fP to skip client\-side validation of the provided BSON documents. .IP \(bu 2 \fBcollation\fP: Configure textual comparisons. See \fI\%Setting Collation Order\fP, and \fI\%the MongoDB Manual entry on Collation\fP\&. Collation requires MongoDB 3.2 or later, otherwise an error is returned. .IP \(bu 2 \fBhint\fP: A document or string that specifies the index to use to support the query predicate. .IP \(bu 2 \fBupsert\fP: If true, insert a document if none match \fBselector\fP\&. .UNINDENT .sp \fBWARNING:\fP .INDENT 0.0 .INDENT 3.5 \fBdocument\fP may not contain fields with keys containing \fB\&.\fP or \fB$\fP\&. .UNINDENT .UNINDENT .SH ERRORS .sp Operation errors are propagated via \fI\%mongoc_bulk_operation_execute()\fP, while argument validation errors are reported by the \fBerror\fP argument. .SH RETURNS .sp Returns true on success, and false if passed invalid arguments. .sp \fBSEE ALSO:\fP .INDENT 0.0 .INDENT 3.5 .nf \fI\%mongoc_bulk_operation_remove_many_with_opts()\fP .fi .sp .nf \fI\%mongoc_bulk_operation_insert()\fP .fi .sp .UNINDENT .UNINDENT .SH AUTHOR MongoDB, Inc .SH COPYRIGHT 2017-present, MongoDB, Inc .\" Generated by docutils manpage writer. .