From 62880ca83b1cf4aa6ffdfef6c6d66e741f940bb1 Mon Sep 17 00:00:00 2001 From: jonathan Date: Mon, 6 Nov 2017 10:38:31 -0500 Subject: [PATCH] Getting Started to use drivers tabs --- source/includes/steps-getting-started.yaml | 12 ++------ source/tutorial/getting-started.txt | 36 +++++----------------- 2 files changed, 10 insertions(+), 38 deletions(-) diff --git a/source/includes/steps-getting-started.yaml b/source/includes/steps-getting-started.yaml index 4c104d3bb15..4d4fd35ec8a 100644 --- a/source/includes/steps-getting-started.yaml +++ b/source/includes/steps-getting-started.yaml @@ -61,11 +61,10 @@ title: "Download the connecting client." level: 3 ref: download-shell-driver content: | - .. tabs-gs:: + .. tabs-drivers:: tabs: - id: shell - name: Mongo Shell content: | To download the :program:`mongo` Shell: @@ -82,14 +81,12 @@ content: | :ref:`Installation`. - id: compass - name: Compass content: | Download MongoDB Compass from the `download center `_ and install it. - id: python - name: Python content: | Install the `PyMongo `_ driver via ``pip``: @@ -102,7 +99,6 @@ content: | For more information, see `Installing Pymongo `_. - id: nodejs - name: Node.js content: | First create your project using ``npm init`` then install the :node-docs:`MongoDB Node.js Driver <>` via ``npm``: @@ -137,11 +133,10 @@ ref: connect-cluster-shell content: | Using the **URI string** from the previous step, connect to the Atlas cluster: - .. tabs-gs:: + .. tabs-drivers:: tabs: - id: shell - name: Mongo Shell content: | .. class:: copyable-code @@ -165,7 +160,6 @@ content: | "C:\Program Files\MongoDB\Server\3.6\bin\mongo.exe" "mongodb://user123:p455w0rd@gettingstarted-shard-00-00-hyjsm.mongodb.net:27017,gettingstarted-shard-00-01-hyjsm.mongodb.net:27017,gettingstarted-shard-00-02-hyjsm.mongodb.net:27017/test?ssl=true&replicaSet=GettingStarted-shard-0&authSource=admin" - id: compass - name: Compass content: | 1. Launch MongoDB Compass with the URI from the previous step copied to the clipboard. 2. A dialog box will prompt you to use the URI to fill out the connect form. Click :guilabel:`Yes`. @@ -181,7 +175,6 @@ content: | 5. Click :guilabel:`Connect`. - id: python - name: Python content: | .. class:: copyable-code @@ -195,7 +188,6 @@ content: | # Paste the following examples here - id: nodejs - name: Node.js content: | .. class:: copyable-code diff --git a/source/tutorial/getting-started.txt b/source/tutorial/getting-started.txt index dd2a0865bf3..db1214c45c3 100644 --- a/source/tutorial/getting-started.txt +++ b/source/tutorial/getting-started.txt @@ -13,18 +13,16 @@ for provisioning, running, monitoring, and maintaining MongoDB deployments. It is a fast, easy, and free way to get started with MongoDB. To install and run MongoDB locally, see :ref:`Install MongoDB`. -.. tabs-gs:: +.. tabs-drivers:: tabs: - id: shell - name: Mongo Shell content: | The following tutorial uses :program:`mongo` shell to connect to an Atlas free-tier cluster, insert data, and perform query operations. - id: compass - name: Compass content: | `MongoDB Compass `_ is the GUI for MongoDB. The following tutorial uses MongoDB Compass to connect @@ -32,7 +30,6 @@ MongoDB locally, see :ref:`Install MongoDB`. operations. - id: python - name: Python content: | The following tutorial uses the `PyMongo `_ Python @@ -40,7 +37,6 @@ MongoDB locally, see :ref:`Install MongoDB`. perform query operations. - id: nodejs - name: Node.js content: | The following tutorial uses the :node-docs:`MongoDB Node.js Driver <>` to connect to an Atlas free-tier cluster, then perform insert and query @@ -62,11 +58,10 @@ MongoDB databases hold collections of documents. Insert Documents ---------------- -.. tabs-gs:: +.. tabs-drivers:: tabs: - id: shell - name: Mongo Shell content: | :method:`db.collection.insertMany()` can insert *multiple* :ref:`documents ` into a collection. Pass an @@ -99,7 +94,6 @@ Insert Documents Use :method:`db.collection.insertOne()` to insert a single document. - id: compass - name: Compass content: | 1. Click :guilabel:`Create Database`. @@ -159,7 +153,6 @@ Insert Documents size: { h: 10, w: 15.25, uom: "cm" }, tags: [ "blue" ] } - id: python - name: Python content: | :py:meth:`pymongo.collection.Collection.insert_many` can insert *multiple* :ref:`documents ` into a collection. @@ -193,7 +186,6 @@ Insert Documents single document. - id: nodejs - name: Node.js content: | :node-api:`Collection.insertMany() ` can insert *multiple* :ref:`documents ` into a @@ -238,18 +230,16 @@ Query Documents Select All Documents ~~~~~~~~~~~~~~~~~~~~ -.. tabs-gs:: +.. tabs-drivers:: tabs: - id: shell - name: Mongo Shell content: | To select all documents in the collection, pass an empty document as the :ref:`query filter document ` to the :method:`db.collection.find()` method: - id: compass - name: Compass content: | Select the ``inventory`` collection from the :guilabel:`Collections` tab or the left-hand pane. By default, all documents are selected and @@ -262,14 +252,12 @@ Select All Documents .. include:: /images/compass-find-all.rst - id: python - name: Python content: | To select all documents in the collection, pass an empty document as the :ref:`query filter document ` to the :py:meth:`pymongo.collection.Collection.find` method: - id: nodejs - name: Node.js content: | To select all documents in the collection, pass an empty document as the :ref:`query filter document ` to the @@ -277,11 +265,10 @@ Select All Documents .. include:: /includes/driver-example-query-7.rst -.. tabs-gs:: +.. tabs-drivers:: tabs: - id: shell - name: Mongo Shell content: | To query for documents that match specific equality conditions, pass the :method:`~db.collection.find()` method a :ref:`query filter document ` @@ -290,7 +277,6 @@ Select All Documents equals ``"D"``: - id: compass - name: Compass content: | To query for documents that match specific equality conditions, pass a :ref:`query filter document ` to the @@ -306,7 +292,6 @@ Select All Documents .. include:: /images/compass-find-filter.rst - id: python - name: Python content: | To query for documents that match specific equality conditions, pass the :py:meth:`~pymongo.collection.Collection.find` method a @@ -316,7 +301,6 @@ Select All Documents ``status`` equals ``"D"``: - id: nodejs - name: Node.js content: | To query for documents that match specific equality conditions, pass the :node-api:`find() ` method a @@ -336,11 +320,10 @@ equals the document ``{ h: 14, w: 21, uom: "cm" }``: .. include:: /includes/driver-example-query-15.rst -.. tabs-gs:: +.. tabs-drivers:: tabs: - id: compass - name: Compass content: | .. class:: copyable-code .. code-block:: javascript @@ -357,11 +340,10 @@ nested in the ``size`` field equals the string value ``"in"``: .. include:: /includes/driver-example-query-17.rst -.. tabs-gs:: +.. tabs-drivers:: tabs: - id: compass - name: Compass content: | .. class:: copyable-code .. code-block:: javascript @@ -378,11 +360,10 @@ array that contains the string ``"red"`` as one of its elements: .. include:: /includes/driver-example-query-23.rst -.. tabs-gs:: +.. tabs-drivers:: tabs: - id: compass - name: Compass content: | .. class:: copyable-code .. code-block:: javascript @@ -400,11 +381,10 @@ in the specified order: .. include:: /includes/driver-example-query-21.rst -.. tabs-gs:: +.. tabs-drivers:: tabs: - id: compass - name: Compass content: | .. class:: copyable-code .. code-block:: javascript