Skip to content

Commit aaaa026

Browse files
authored
Drivers landing pages (#497)
* DOCSP-5398 Create Java driver landing page First stab at migrating content to page template. * Add connection guides and university images * Add connect to Atlas example * DOCSP-5401 Apply landing page template to C++ driver * DOCSP-5400 Apply template to C driver landing page * DOCSP-5399 Apply template to node driver landing page * Move compatibility tables to their own files and reference them * Remove non-Atlas ways to connect (as they are linked below) Per feedback, these are cluttering the page and also untested on these pages. The point is to provide a quick start for Atlas, so that is still in and a link to "more ways to connect" is added below. * Fix more warnings * Remove "additional resources" appender for Java driver page It has outdated and redundant links. * Address comments, update examples * Use builder for Java connection example * Update university header
1 parent 13110fc commit aaaa026

16 files changed

+949
-509
lines changed

source/drivers.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ For information on MongoDB licensing, see `MongoDB Licensing
3232
.. toctree::
3333
:titlesonly:
3434

35-
C Driver <http://mongoc.org/?jmp=docs>
36-
C++ Driver<https://mongodb.github.io/mongo-cxx-driver/?jmp=docs>
35+
C Driver </drivers/c>
36+
C++ Driver </drivers/cxx>
3737
C# and .NET Driver </drivers/csharp>
3838
Go Driver </drivers/go>
39-
Java Driver <http://mongodb.github.io/mongo-java-driver/?jmp=docs>
40-
Node.js Driver <https://mongodb.github.io/node-mongodb-native/?jmp=docs>
39+
Java Driver </drivers/java>
40+
Node.js Driver </drivers/node>
4141
Perl Driver </drivers/perl>
4242
PHP Driver </drivers/php>
4343
Python Driver </drivers/python>

source/drivers/c.txt

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
.. include:: /includes/unicode-checkmark.rst
2+
3+
================
4+
MongoDB C Driver
5+
================
6+
7+
.. default-domain:: mongodb
8+
9+
.. contents:: On this page
10+
:local:
11+
:backlinks: none
12+
:depth: 1
13+
:class: twocols
14+
15+
Introduction
16+
------------
17+
18+
The MongoDB C Driver, also known as “libmongoc”, is the official client library
19+
for C applications, and provides a base for MongoDB drivers in higher-level
20+
languages.
21+
22+
The library is compatible with all major platforms. It depends on libbson
23+
to create and parse BSON data.
24+
25+
- `Tutorial <http://mongoc.org/libmongoc/current/tutorial.html>`__
26+
27+
- `Usage Guide <http://mongoc.org/libmongoc/current/index.html>`__
28+
29+
- `API Reference <http://mongoc.org/libmongoc/current/api.html>`_
30+
31+
- `Changelog <https://github.com/mongodb/mongo-c-driver/releases>`__
32+
33+
- `Source Code <https://github.com/mongodb/mongo-c-driver>`__
34+
35+
36+
Installation
37+
------------
38+
39+
See `Installing the MongoDB C Driver (libmongoc) and BSON library (libbson)
40+
<http://mongoc.org/libmongoc/current/installing.html>`__.
41+
42+
43+
Connect to MongoDB Atlas
44+
------------------------
45+
46+
To connect to a `MongoDB Atlas <https://docs.atlas.mongodb.com/>`_ cluster, use the `Atlas connection string <https://docs.atlas.mongodb.com/driver-connection>`__ for your cluster:
47+
48+
.. code-block:: c
49+
50+
#include <mongoc/mongoc.h>
51+
52+
int
53+
main (int argc, char *argv[])
54+
{
55+
mongoc_database_t *database;
56+
mongoc_client_t *client;
57+
58+
mongoc_init ();
59+
60+
client = mongoc_client_new(
61+
"mongodb+srv://<username>:<password>@<cluster-url>/test?retryWrites=true"
62+
);
63+
database = mongoc_client_get_database (client, "test");
64+
65+
mongoc_database_destroy (database);
66+
mongoc_client_destroy (client);
67+
68+
mongoc_cleanup ();
69+
70+
return 0;
71+
}
72+
73+
74+
See `Advanced Connections <http://mongoc.org/libmongoc/current/advanced-connections.html>`__
75+
for more ways to connect.
76+
77+
78+
Compatibility
79+
-------------
80+
81+
MongoDB Compatibility
82+
~~~~~~~~~~~~~~~~~~~~~
83+
84+
.. include:: /includes/extracts/c-driver-compatibility-matrix-mongodb.rst
85+
86+
.. include:: /includes/mongodb-compatibility-table-c.rst
87+
88+
.. include:: /includes/older-server-versions-unsupported.rst
89+
90+
Language Compatibility
91+
~~~~~~~~~~~~~~~~~~~~~~
92+
93+
.. include:: /includes/extracts/c-driver-compatibility-matrix-language.rst
94+
95+
.. include:: /includes/language-compatibility-table-c.rst
96+
97+
98+
How to get help
99+
---------------
100+
101+
- Join our `Google Group <http://groups.google.com/group/mongodb-user>`__.
102+
- Ask on `Stack Overflow <http://stackoverflow.com/questions/tagged/mongodb-c>`__.
103+
- Visit our `Support Channels <http://www.mongodb.org/about/support>`__.
104+
- File a bug or feature request on `JIRA <https://jira.mongodb.org/browse/CDRIVER>`__.
105+
106+

source/drivers/cxx.txt

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
.. include:: /includes/unicode-checkmark.rst
2+
3+
==================
4+
MongoDB C++ Driver
5+
==================
6+
7+
.. default-domain:: mongodb
8+
9+
.. contents:: On this page
10+
:local:
11+
:backlinks: none
12+
:depth: 1
13+
:class: twocols
14+
15+
Introduction
16+
------------
17+
18+
The MongoDB C++ Driver is the official client library for C++ applications
19+
using the C++11 (or later) standard.
20+
21+
- `Tutorial <http://mongocxx.org/mongocxx-v3/tutorial/>`__
22+
23+
- `Usage Guide <http://mongocxx.org/mongocxx-v3/>`__
24+
25+
- `API Reference <http://mongocxx.org/api/current/>`_
26+
27+
- `Changelog <https://github.com/mongodb/mongo-cxx-driver/releases>`__
28+
29+
- `Source Code <https://github.com/mongodb/mongo-cxx-driver/>`__
30+
31+
32+
Installation
33+
------------
34+
35+
See `Installing the mongocxx driver <http://mongocxx.org/mongocxx-v3/installation/>`__.
36+
37+
38+
Connect to MongoDB Atlas
39+
------------------------
40+
41+
To connect to a `MongoDB Atlas <https://docs.atlas.mongodb.com/>`_ cluster, use the `Atlas connection string <https://docs.atlas.mongodb.com/driver-connection>`__ for your cluster:
42+
43+
.. code-block:: cpp
44+
45+
#include <mongocxx/client.hpp>
46+
#include <mongocxx/instance.hpp>
47+
48+
//...
49+
50+
mongocxx::instance inst{}; // This should be done only once.
51+
mongocxx::client conn{
52+
mongocxx::uri{
53+
"mongodb+srv://<username>:<password>@<cluster-url>/test?retryWrites=true"
54+
}
55+
};
56+
mongocxx::database db = conn["test"];
57+
58+
59+
60+
Compatibility
61+
-------------
62+
63+
MongoDB Compatibility
64+
~~~~~~~~~~~~~~~~~~~~~
65+
66+
.. include:: /includes/extracts/cpp-driver-compatibility-matrix-mongodb.rst
67+
68+
.. include:: /includes/mongodb-compatibility-table-cxx.rst
69+
70+
.. include:: /includes/older-server-versions-unsupported.rst
71+
72+
Language Compatibility
73+
~~~~~~~~~~~~~~~~~~~~~~
74+
75+
.. include:: /includes/extracts/cpp-driver-compatibility-matrix-language.rst
76+
77+
.. include:: /includes/language-compatibility-table-cxx.rst
78+
79+
80+
How to get help
81+
---------------
82+
83+
- Join our `Google Group <http://groups.google.com/group/mongodb-user>`__.
84+
- Ask on `Stack Overflow <https://stackoverflow.com/questions/tagged/mongodb%20c%2b%2b>`__.
85+
- Visit our `Support Channels <http://www.mongodb.org/about/support>`__.
86+
- See how to `report a bug <http://mongocxx.org/reporting-bugs/>`__.
87+
88+

0 commit comments

Comments
 (0)