.\" Man page generated from reStructuredText. . .TH "MONGOC_COLLECTION_COMMAND" "3" "Jun 04, 2021" "1.17.6" "libmongoc" .SH NAME mongoc_collection_command \- mongoc_collection_command() . .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_cursor_t * mongoc_collection_command (mongoc_collection_t *collection, mongoc_query_flags_t flags, uint32_t skip, uint32_t limit, uint32_t batch_size, const bson_t *command, const bson_t *fields, const mongoc_read_prefs_t *read_prefs) BSON_GNUC_WARN_UNUSED_RESULT; .ft P .fi .UNINDENT .UNINDENT .sp This function is superseded by \fBmongoc_collection_command_with_opts()\fP, \fBmongoc_collection_read_command_with_opts()\fP, \fBmongoc_collection_write_command_with_opts()\fP, and \fBmongoc_collection_read_write_command_with_opts()\fP\&. .sp This function is not considered a retryable read operation. .SH PARAMETERS .INDENT 0.0 .IP \(bu 2 \fBcollection\fP: A \fBmongoc_collection_t\fP\&. .IP \(bu 2 \fBflags\fP: A \fBmongoc_query_flags_t\fP\&. .IP \(bu 2 \fBskip\fP: A uint32_t with the number of documents to skip or zero. .IP \(bu 2 \fBlimit\fP: A uint32_t with the max number of documents to return or zero. .IP \(bu 2 \fBbatch_size\fP: A uint32_t with the number of documents in each batch or zero. Default is 100. .IP \(bu 2 \fBcommand\fP: A \fI\%bson_t\fP containing the command to execute. .IP \(bu 2 \fBfields\fP: A \fI\%bson_t\fP containing the fields to return or \fBNULL\fP\&. Not all commands support this option. .IP \(bu 2 \fBread_prefs\fP: An optional \fBmongoc_read_prefs_t\fP\&. Otherwise, the command uses mode \fBMONGOC_READ_PRIMARY\fP\&. .UNINDENT .SH RETURNS .sp A \fBmongoc_cursor_t\fP\&. .sp The cursor should be freed with \fBmongoc_cursor_destroy()\fP\&. .SH AUTHOR MongoDB, Inc .SH COPYRIGHT 2017-present, MongoDB, Inc .\" Generated by docutils manpage writer. .