MONGOC_FIND_AN..._OPTS_GET_SORT(3)
β¨ MONGOC_FIND_AN..._OPTS_GET_SORT(3) β¨
Okay so this is the MONGOC_FIND_AN..._OPTS_GET_SORT(3) page from libmongoc, and itβs literally the getter for the sort document on your find-and-modify options. Short, sweet, no cap. π
πΈ SYNOPSIS πΈ
void
mongoc_find_and_modify_opts_get_sort (const mongoc_find_and_modify_opts_t *opts,
bson_t *sort);
π«Ά PARAMETERS π«Ά
optsβ Amongoc_find_and_modify_opts_t. Thatβs the options object youβre pulling the sort from, bestie.sortβ An uninitializedbson_t. Yeah, uninitialized β donβt come in thinking itβs already set up. π
π DESCRIPTION π
This function copies the sort document that was set with mongoc_find_and_modify_opts_set_sort(), or it initializes sort with an empty BSON document. Thatβs it. Thatβs the whole vibe. β¨
So if a sort document was previously set, you get a copy of it in sort; if not, sort gets initialized as an empty BSON document. Either way, sort is a properly initialized bson_t after the call. π¦
π AUTHOR π
MongoDB, Inc
π COPYRIGHT π
2009-present, MongoDB, Inc.
Periodt. Thatβs the whole page. Take the empty-BSON fallback as a gift and go slay your query. π β¨
Big sparkly goodbye from libmongoc version 2.5.6, dated Oct 09, 202 β mwah ππΈ
π¦ 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