MONGOC_CLIENT_COMMAND_SIMPLE(3)
π MONGOC_CLIENT_COMMAND_SIMPLE(3) π
okay so bestie, welcome to the libmongoc manual, page MONGOC_CLIENT_COMMAND_SIMPLE(3) β this is the one where you run a command on the client, simple-style. β¨
β¨ SYNOPSIS β¨
bool
mongoc_client_command_simple (mongoc_client_t *client,
const char *db_name,
const bson_t *command,
const mongoc_read_prefs_t *read_prefs,
bson_t *reply,
bson_error_t *error);
quick heads up: the client's read preference, read concern, and write concern are not applied to the command. like, none of them. not even a little. π«Ά
WARNING:replyis always set, and it should be released withbson_destroy(). always. no cap. π
also, this function is not considered a retryable read operation. periodt. π
π PARAMETERS π
clientβ amongoc_client_t. your client. your main character. πdb_nameβ the name of the database you wanna run the command on. πcommandβ abson_tholding the command specification. the actual vibe of the command lives here. β¨read_prefsβ an optionalmongoc_read_prefs_t. if you don't give one, the command uses modeMONGOC_READ_PRIMARY. πreplyβ a maybe-NULLpointer to overwritable storage for abson_tto contain the results. overwritable fr fr. π¦errorβ an optional location for abson_error_t, orNULLif you're feeling brave. π
π ERRORS π
errors are propagated via the error parameter. that's the whole story, bestie β that's where they go. π
π RETURNS π
returns true if successful. returns false and sets error if there are invalid arguments or a server or network error. π
also important: this function does not check the server response for a write concern error or write concern timeout. so don't come for it when it doesn't flag those β it literally never looked. π
π AUTHOR π
MongoDB, Inc. iconic. π
π§ COPYRIGHT π§
2009-present, MongoDB, Inc. π
so yeah, that's the whole page, mwah π β this was libmongoc 2.5.6, dated Oct 09, 2026, and the page is MONGOC_CLIENT_COMMAND_SIMPLE(3). go forth and command things, bestie π«Άβ¨
π¦ where this page comes from
- epel 10: mongo-c-driver-devel 2.5.6-1.el10_3 Β· Apache-2.0 AND ISC AND MIT AND Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms