.\" This manpage is Copyright (C) 2016 MongoDB, Inc. .\" .\" Permission is granted to copy, distribute and/or modify this document .\" under the terms of the GNU Free Documentation License, Version 1.3 .\" or any later version published by the Free Software Foundation; .\" with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. .\" A copy of the license is included in the section entitled "GNU .\" Free Documentation License". .\" .TH "MONGOC_CLIENT_COMMAND" "3" "2016\(hy10\(hy12" "MongoDB C Driver" .SH NAME mongoc_client_command() \- None .SH "SYNOPSIS" .nf .nf 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); .fi .fi This function executes a command on the server using the database and command specification provided. .SH "PARAMETERS" .TP .B client A .B mongoc_client_t . .LP .TP .B db_name The name of the database to run the command on. .LP .TP .B flags A .B mongoc_query_flags_t . .LP .TP .B skip The number of result documents to skip. .LP .TP .B limit The maximum number of documents to return. .LP .TP .B batch_size The batch size of documents to return from the MongoDB server. .LP .TP .B query A .B bson_t containing the command specification. .LP .TP .B fields An optional .B bson_t containing the fields to return in result documents. .LP .TP .B read_prefs An optional .B mongoc_read_prefs_t . Otherwise, the command uses mode .B MONGOC_READ_PRIMARY . .LP .SH "RETURNS" A .B mongoc_cursor_t . The cursor should be freed with .B mongoc_cursor_destroy(3) . .B .SH COLOPHON This page is part of MongoDB C Driver. Please report any bugs at https://jira.mongodb.org/browse/CDRIVER.