1MONGOC_SESSION_OPTS_SET_DEFAMUOLNTG_OTCR_ASNlESiSAbSCmIToOInNOg_NoO_cPOTPST_SS(E3T)_DEFAULT_TRANSACTION_OPTS(3)
2
3
4

NAME

6       mongoc_session_opts_set_default_transaction_opts      -     mongoc_ses‐
7       sion_opts_set_default_transaction_opts()
8

SYNOPSIS

10          void
11          mongoc_session_opts_set_default_transaction_opts (
12             mongoc_session_opt_t *opts, const mongoc_transaction_opt_t *txn_opts);
13
14       Set the default options for transactions started with this session. The
15       txn_opts  argument  is copied and can be freed after calling this func‐
16       tion.
17
18       When a session is first created  with  mongoc_client_start_session,  it
19       inherits  from  the  client  the  read concern, write concern, and read
20       preference with which to start transactions. Each of these  fields  can
21       be  overridden  independently.  Create  a mongoc_transaction_opt_t with
22       mongoc_transaction_opts_new, and pass a non-NULL option to any  of  the
23       mongoc_transaction_opt_t setter functions:
24
25mongoc_transaction_opts_set_read_concern
26
27mongoc_transaction_opts_set_write_concern
28
29mongoc_transaction_opts_set_read_prefs
30
31       Pass  the  resulting transaction options to mongoc_session_opts_set_de‐
32       fault_transaction_opts. Each field set in the transaction options over‐
33       rides  the  inherited  client configuration. There is an opportunity to
34       override each one of these fields again by  passing  a  mongoc_transac‐
35       tion_opt_t to mongoc_client_session_start_transaction.
36

PARAMETERS

38opts: A mongoc_session_opt_t.
39
40txn_opts: A mongoc_transaction_opt_t.
41

AUTHOR

43       MongoDB, Inc
44
46       2017-present, MongoDB, Inc
47
48
49
50
511.21.1                     MONGOCM_aSrES0S2I,ON2_0O2P2TS_SET_DEFAULT_TRANSACTION_OPTS(3)
Impressum