.\" Man page generated from reStructuredText. . .TH "MONGOC_DATABASE_COMMAND" "3" "Jun 04, 2021" "1.17.6" "libmongoc" .SH NAME mongoc_database_command \- mongoc_database_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_database_command (mongoc_database_t *database, 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); .ft P .fi .UNINDENT .UNINDENT .sp This function is superseded by \fBmongoc_database_command_with_opts()\fP, \fBmongoc_database_read_command_with_opts()\fP, \fBmongoc_database_write_command_with_opts()\fP, and \fBmongoc_database_read_write_command_with_opts()\fP\&. .SH DESCRIPTION .sp This function creates a cursor which will execute the command when \fBmongoc_cursor_next\fP is called on it. The database\(aqs read preference, read concern, and write concern are not applied to the command, and \fBmongoc_cursor_next\fP will not check the server response for a write concern error or write concern timeout. .sp This function is not considered a retryable read operation. .SH PARAMETERS .INDENT 0.0 .IP \(bu 2 \fBdatabase\fP: A \fBmongoc_database_t\fP\&. .IP \(bu 2 \fBflags\fP: A \fBmongoc_query_flags_t\fP\&. .IP \(bu 2 \fBskip\fP: The number of documents to skip on the server. .IP \(bu 2 \fBlimit\fP: The maximum number of documents to return from the cursor. .IP \(bu 2 \fBbatch_size\fP: Attempt to batch results from the server in groups of \fBbatch_size\fP documents. .IP \(bu 2 \fBcommand\fP: A \fI\%bson_t\fP containing the command. .IP \(bu 2 \fBfields\fP: An optional \fI\%bson_t\fP containing the fields to return. \fBNULL\fP for all fields. .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. .