Skip to content

Commit 894b059

Browse files
DOCSP-17382 connecting to serverless (#744)
* added note about connecting to serverless
1 parent ab9e222 commit 894b059

File tree

13 files changed

+32
-3
lines changed

13 files changed

+32
-3
lines changed

source/c.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ Connect to MongoDB Atlas
7272
return 0;
7373
}
7474

75+
.. include:: /includes/serverless-compatibility.rst
76+
7577
See `Advanced Connections <http://mongoc.org/libmongoc/current/advanced-connections.html>`__
7678
for more ways to connect.
7779

source/csharp.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ Connect to MongoDB Atlas
6565
);
6666
var database = client.GetDatabase("test");
6767

68+
.. include:: /includes/serverless-compatibility.rst
69+
6870
See `Connecting <https://mongodb.github.io/mongo-csharp-driver/2.12/reference/driver/connecting/>`__
6971
for more information.
7072

source/cxx.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ Connect to MongoDB Atlas
5656
};
5757
mongocxx::database db = conn["test"];
5858

59+
.. include:: /includes/serverless-compatibility.rst
60+
5961
Connect to ``localhost``
6062
------------------------
6163

source/go.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ Connect to MongoDB Atlas
5353
.. literalinclude:: /includes/connection-snippets/go-connection.go
5454
:language: go
5555

56+
.. include:: /includes/serverless-compatibility.rst
57+
5658
See `Usage <https://github.com/mongodb/mongo-go-driver#usage>`__
5759
for more detail.
5860

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.. note::
2+
3+
For information about connecting to Atlas Serverless, see the
4+
:atlas:`Serverless Instance Limitations page
5+
</reference/serverless-instance-limitations/#minimum-driver-versions-for-serverless-instances>`
6+
for the minimum driver version you need.

source/java.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,11 @@ Connect to MongoDB Atlas
7676
MongoClient mongoClient = MongoClients.create(settings);
7777
MongoDatabase database = mongoClient.getDatabase("test");
7878

79+
.. include:: /includes/serverless-compatibility.rst
80+
7981
See :java-docs:`Connect to MongoDB <driver/tutorials/connect-to-mongodb/>`
8082
for more ways to connect.
8183

82-
8384
Compatibility
8485
-------------
8586

source/motor.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Motor (Async Driver)
1111
.. contents:: On this page
1212
:local:
1313
:backlinks: none
14-
:depth: 2
14+
:depth: 1
1515
:class: twocols
1616

1717
Introduction
@@ -116,6 +116,8 @@ following code to connect:
116116

117117
tornado.ioloop.IOLoop.current().run_sync(get_server_info)
118118

119+
.. include:: /includes/serverless-compatibility.rst
120+
119121
If the connection succeeds before a five-second timeout, you will see a
120122
dictionary containing information about the server you connected to.
121123

source/php.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ Connect to MongoDB Atlas
111111

112112
$db = $client->test;
113113

114+
.. include:: /includes/serverless-compatibility.rst
115+
114116
Connect to ``localhost``
115117
------------------------
116118

source/pymongo.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ PyMongo
99
.. contents:: On this page
1010
:local:
1111
:backlinks: none
12-
:depth: 2
12+
:depth: 1
1313
:class: singlecol
1414

1515
Introduction
@@ -86,6 +86,8 @@ Connect to MongoDB Atlas
8686
except Exception:
8787
print("Unable to connect to the server.")
8888

89+
.. include:: /includes/serverless-compatibility.rst
90+
8991
If the connection succeeds before a five-second timeout, you will see a
9092
dictionary containing information about the server you connected to.
9193

source/reactive-streams.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ Connect to MongoDB Atlas
6060
MongoClient mongoClient = MongoClients.create(settings);
6161
MongoDatabase database = mongoClient.getDatabase("test");
6262

63+
.. include:: /includes/serverless-compatibility.rst
64+
6365
See :java-docs:`Connect to MongoDB <driver-reactive/tutorials/connect-to-mongodb/>`
6466
for more ways to connect.
6567

0 commit comments

Comments
 (0)