.\" 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_CLIENT_COMMAND" "3" "Oct 20, 2022" "1.23.1" "libmongoc"
.SH NAME
mongoc_client_command \- mongoc_client_command()
.SH SYNOPSIS
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
mongoc_cursor_t *
mongoc_client_command (mongoc_client_t *client,
                       const char *db_name,
                       mongoc_query_flags_t flags,
                       uint32_t skip,
                       uint32_t limit,
                       uint32_t batch_size,
                       const bson_t *query,
                       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 \fI\%mongoc_client_command_with_opts()\fP, \fI\%mongoc_client_read_command_with_opts()\fP, \fI\%mongoc_client_write_command_with_opts()\fP, and \fI\%mongoc_client_read_write_command_with_opts()\fP\&.
.sp
This function is not considered a retryable read operation.
.SH DESCRIPTION
.sp
This function creates a cursor which will execute the command when \fI\%mongoc_cursor_next()\fP is called on it. The client\(aqs read preference, read concern, and write concern are not applied to the command, and \fI\%mongoc_cursor_next()\fP will not check the server response for a write concern error or write concern timeout.
.sp
If \fI\%mongoc_cursor_next()\fP returns \fBfalse\fP, then retrieve error details with \fI\%mongoc_cursor_error()\fP or \fI\%mongoc_cursor_error_document()\fP\&.
.SH PARAMETERS
.INDENT 0.0
.IP \(bu 2
\fBclient\fP: A \fI\%mongoc_client_t\fP\&.
.IP \(bu 2
\fBdb_name\fP: The name of the database to run the command on.
.IP \(bu 2
\fBflags\fP: Unused.
.IP \(bu 2
\fBskip\fP: Unused.
.IP \(bu 2
\fBlimit\fP: Unused.
.IP \(bu 2
\fBbatch_size\fP: Unused.
.IP \(bu 2
\fBquery\fP: A \fI\%bson_t\fP containing the command specification.
.IP \(bu 2
\fBfields\fP: Unused.
.IP \(bu 2
\fBread_prefs\fP: An optional \fI\%mongoc_read_prefs_t\fP\&. Otherwise, the command uses mode \fBMONGOC_READ_PRIMARY\fP\&.
.UNINDENT
.SH RETURNS
.sp
A \fI\%mongoc_cursor_t\fP\&.
.sp
The cursor should be freed with \fI\%mongoc_cursor_destroy()\fP\&.
.SH AUTHOR
MongoDB, Inc
.SH COPYRIGHT
2017-present, MongoDB, Inc
.\" Generated by docutils manpage writer.
.