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

SYNOPSIS

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

PARAMETERS

35opts: A mongoc_session_opt_t.
36
37txn_opts: A mongoc_transaction_opt_t.
38

AUTHOR

40       MongoDB, Inc
41
43       2017-present, MongoDB, Inc
44
45
46
47
481.25.1                     MONGOCN_oSvES0S8I,ON2_0O2P3TS_SET_DEFAULT_TRANSACTION_OPTS(3)
Impressum