MONGOC_SESSION...ANSACTION_OPTS(3)
π MONGOC_SESSION...ANSACTION_OPTS(3) π
okay bestie, welcome to the libmongoc corner of the manual β this one's about mongoc_session_opts_get_transaction_opts, and yes the header got a little chopped up in the terminal but that's just how man pages be. no cap, it's a good one.
β¨ SYNOPSIS β¨
mongoc_transaction_opt_t *
mongoc_session_opts_get_transaction_opts (
const mongoc_client_session_t *session);
πΈ DESCRIPTION πΈ
so basically this function hands you the options for the current transaction started with this session. that's the whole vibe. π«Ά
and if this session is not in a transaction? then the returned value is NULL. literally nothing, bestie, not a crash. go check mongoc_client_session_in_transaction() if you want to know for sure before you call this. iykyk. π
π¦ PARAMETERS π¦
sessionβ amongoc_client_session_t. that's it. that's the whole list. iconic.
π RETURNS π
if the session is in a transaction, you get a brand-new mongoc_transaction_opt_t, and β this is the important part, don't skip it β it must be freed with mongoc_transaction_opts_destroy(). it's giving "you break it, you bought it" energy but for memory. π
otherwise? NULL. as established. π
no cap: if you forget the mongoc_transaction_opts_destroy() you're gonna have a leak and we're gonna have to have a talk.
β AUTHOR β
MongoDB, Inc β slay, ily.
π COPYRIGHT π
2009-present, MongoDB, Inc. that's a long-run reign, honestly queen behavior. π
and that's the page, bestie! πβ¨ this was libmongoc version 2.5.6, dated Oct 09, and it's a wrap β mwah, bye ππ§ββοΈ
π¦ 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