-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
Copy pathjs-connection.txt
93 lines (69 loc) · 2.88 KB
/
js-connection.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
==================
Connection Methods
==================
.. default-domain:: mongodb
.. contents:: On this page
:local:
:backlinks: none
:depth: 1
:class: singlecol
.. include:: /includes/extracts/methods-toc-explanation.rst
.. list-table::
:widths: 30,70
:header-rows: 1
* - Name
- Description
* - :doc:`/reference/method/connect`
- Connects to a MongoDB instance and to a specified database on that instance.
* - :method:`Mongo()`
- Creates a new connection object.
* - :method:`Mongo.getDB()`
- Returns a database object.
* - :method:`Mongo.getDBNames()`
- Returns a list of databases.
* - :method:`Mongo.getDBs()`
- Returns a document with a list of databases and metadata.
* - :method:`Mongo.getReadPrefMode()`
- Returns the current read preference mode for the MongoDB connection.
* - :method:`Mongo.getReadPrefTagSet()`
- Returns the read preference tag set for the MongoDB connection.
* - :method:`Mongo.getURI()`
- Returns the connection string for the current active connection.
* - :method:`Mongo.getWriteConcern`
- Returns the :term:`write concern` for the connection object.
* - :method:`Mongo.setCausalConsistency()`
- Enables or disables causal consistency on the connection object.
* - :method:`Mongo.setReadPref()`
- Sets the :term:`read preference` for the MongoDB connection.
* - :method:`Mongo.setWriteConcern`
- Sets the :term:`write concern` for the connection object.
* - :method:`Mongo.startSession()`
- Starts a session on the connection object.
* - :method:`Mongo.watch()`
- Opens a :ref:`change stream cursor <changeStreams>` for a deployment
to report on all its non-``system`` collections across all its
databases, excluding the internal ``admin``, ``local``, and
``config`` databases.
* - :method:`Session`
- The session object.
* - :method:`SessionOptions`
- The options object for the session.
.. toctree::
:titlesonly:
:hidden:
connect </reference/method/connect>
Mongo </reference/method/Mongo>
Mongo.getDB </reference/method/Mongo.getDB>
Mongo.getDBNames </reference/method/Mongo.getDBNames>
Mongo.getDBs </reference/method/Mongo.getDBs>
Mongo.getReadPrefMode </reference/method/Mongo.getReadPrefMode>
Mongo.getReadPrefTagSet </reference/method/Mongo.getReadPrefTagSet>
Mongo.getURI </reference/method/Mongo.getURI>
Mongo.getWriteConcern </reference/method/Mongo.getWriteConcern>
Mongo.setCausalConsistency </reference/method/Mongo.setCausalConsistency>
Mongo.setReadPref </reference/method/Mongo.setReadPref>
Mongo.startSession </reference/method/Mongo.startSession>
Mongo.setWriteConcern </reference/method/Mongo.setWriteConcern>
Mongo.watch </reference/method/Mongo.watch>
Session </reference/method/Session>
SessionOptions </reference/method/SessionOptions>