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
25       · mongoc_transaction_opts_set_read_concern
26
27       · mongoc_transaction_opts_set_write_concern
28
29       · mongoc_transaction_opts_set_read_prefs
30
31       Pass    the    resulting    transaction    options    to    mongoc_ses‐
32       sion_opts_set_default_transaction_opts. Each field set in the  transac‐
33       tion  options overrides the inherited client configuration. There is an
34       opportunity to override each one of these fields  again  by  passing  a
35       mongoc_transaction_opt_t to mongoc_client_session_start_transaction.
36

PARAMETERS

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

AUTHOR

43       MongoDB, Inc
44
46       2017-present, MongoDB, Inc
47
48
49
50
511.16.2                     MONGOCF_eSbES2S5I,ON2_0O2P0TS_SET_DEFAULT_TRANSACTION_OPTS(3)
Impressum