From e3433ced54bea04e8154292dc5b6b6589c500646 Mon Sep 17 00:00:00 2001 From: Dave Cuthbert Date: Tue, 20 Apr 2021 14:02:54 -0400 Subject: [PATCH] DOCSP-15489 update mongo shell banner for mongosh --- .../includes/fact-mongo-shell-method-toc.rst | 5 ----- source/includes/fact-mongo-shell-method.rst | 7 ------- .../fact-mongosh-shell-method-toc.rst | 18 +++++++++++++++++ source/includes/fact-mongosh-shell-method.rst | 20 +++++++++++++++++++ source/reference/method.txt | 6 +++--- source/reference/method/cursor.addOption.txt | 2 +- .../reference/method/cursor.allowDiskUse.txt | 2 +- .../method/cursor.allowPartialResults.txt | 2 +- source/reference/method/cursor.batchSize.txt | 2 +- source/reference/method/cursor.close.txt | 2 +- source/reference/method/cursor.collation.txt | 2 +- source/reference/method/cursor.comment.txt | 2 +- source/reference/method/cursor.count.txt | 2 +- source/reference/method/cursor.explain.txt | 2 +- source/reference/method/cursor.forEach.txt | 2 +- source/reference/method/cursor.hasNext.txt | 2 +- source/reference/method/cursor.hint.txt | 2 +- source/reference/method/cursor.isClosed.txt | 2 +- .../reference/method/cursor.isExhausted.txt | 2 +- source/reference/method/cursor.itcount.txt | 2 +- source/reference/method/cursor.limit.txt | 2 +- source/reference/method/cursor.map.txt | 2 +- source/reference/method/cursor.max.txt | 2 +- source/reference/method/cursor.maxTimeMS.txt | 2 +- source/reference/method/cursor.min.txt | 2 +- source/reference/method/cursor.next.txt | 2 +- .../method/cursor.noCursorTimeout.txt | 2 +- .../method/cursor.objsLeftInBatch.txt | 2 +- source/reference/method/cursor.pretty.txt | 2 +- .../reference/method/cursor.readConcern.txt | 2 +- source/reference/method/cursor.readPref.txt | 2 +- source/reference/method/cursor.returnKey.txt | 2 +- .../reference/method/cursor.showRecordId.txt | 2 +- source/reference/method/cursor.size.txt | 2 +- source/reference/method/cursor.skip.txt | 2 +- source/reference/method/cursor.sort.txt | 2 +- source/reference/method/cursor.tailable.txt | 2 +- source/reference/method/cursor.toArray.txt | 2 +- source/reference/method/db.adminCommand.txt | 2 ++ .../method/db.collection.aggregate.txt | 2 +- .../method/db.collection.bulkWrite.txt | 2 +- .../reference/method/db.collection.copyTo.txt | 2 +- .../reference/method/db.collection.count.txt | 2 +- .../method/db.collection.countDocuments.txt | 2 +- .../method/db.collection.createIndex.txt | 2 +- .../method/db.collection.createIndexes.txt | 2 +- .../method/db.collection.dataSize.txt | 2 +- .../method/db.collection.deleteMany.txt | 2 +- .../method/db.collection.deleteOne.txt | 2 +- .../method/db.collection.distinct.txt | 2 +- .../reference/method/db.collection.drop.txt | 2 +- .../method/db.collection.dropIndex.txt | 2 +- .../method/db.collection.dropIndexes.txt | 2 +- .../db.collection.estimatedDocumentCount.txt | 2 +- .../method/db.collection.explain.txt | 2 +- .../reference/method/db.collection.find.txt | 2 +- .../method/db.collection.findAndModify.txt | 2 +- .../method/db.collection.findOne.txt | 2 +- .../method/db.collection.findOneAndDelete.txt | 2 +- .../db.collection.findOneAndReplace.txt | 2 +- .../method/db.collection.findOneAndUpdate.txt | 2 +- .../method/db.collection.getIndexes.txt | 2 +- .../method/db.collection.getPlanCache.txt | 2 +- .../db.collection.getShardDistribution.txt | 2 +- .../method/db.collection.getShardVersion.txt | 2 +- .../method/db.collection.hideIndex.txt | 2 +- .../db.collection.initializeOrderedBulkOp.txt | 2 +- ...b.collection.initializeUnorderedBulkOp.txt | 2 +- .../reference/method/db.collection.insert.txt | 2 +- .../method/db.collection.insertMany.txt | 2 +- .../method/db.collection.insertOne.txt | 2 +- .../method/db.collection.isCapped.txt | 2 +- .../method/db.collection.latencyStats.txt | 2 +- .../method/db.collection.mapReduce.txt | 2 +- .../method/db.collection.reIndex.txt | 2 +- .../reference/method/db.collection.remove.txt | 2 +- .../method/db.collection.renameCollection.txt | 2 +- .../method/db.collection.replaceOne.txt | 2 +- .../reference/method/db.collection.save.txt | 2 +- .../reference/method/db.collection.stats.txt | 2 +- .../method/db.collection.storageSize.txt | 2 +- .../method/db.collection.totalIndexSize.txt | 2 +- .../method/db.collection.totalSize.txt | 2 +- .../method/db.collection.unhideIndex.txt | 2 +- .../reference/method/db.collection.update.txt | 2 +- .../method/db.collection.updateMany.txt | 2 +- .../method/db.collection.updateOne.txt | 2 +- .../method/db.collection.validate.txt | 2 +- .../reference/method/db.collection.watch.txt | 2 +- source/reference/method/db.getMongo.txt | 9 +++++++++ source/reference/method/js-collection.txt | 4 ++-- source/reference/method/js-cursor.txt | 4 ++-- 92 files changed, 139 insertions(+), 102 deletions(-) delete mode 100644 source/includes/fact-mongo-shell-method-toc.rst delete mode 100644 source/includes/fact-mongo-shell-method.rst create mode 100644 source/includes/fact-mongosh-shell-method-toc.rst create mode 100644 source/includes/fact-mongosh-shell-method.rst diff --git a/source/includes/fact-mongo-shell-method-toc.rst b/source/includes/fact-mongo-shell-method-toc.rst deleted file mode 100644 index de9cbc54114..00000000000 --- a/source/includes/fact-mongo-shell-method-toc.rst +++ /dev/null @@ -1,5 +0,0 @@ -The methods listed on this table of contents page refer to the -:binary:`~bin.mongo` shell methods, and *not* to the MongoDB Node.js -driver (or any other driver) methods. For corresponding MongoDB driver -API, refer to your specific :driver:`MongoDB driver ` -documentation instead. diff --git a/source/includes/fact-mongo-shell-method.rst b/source/includes/fact-mongo-shell-method.rst deleted file mode 100644 index 2320429354e..00000000000 --- a/source/includes/fact-mongo-shell-method.rst +++ /dev/null @@ -1,7 +0,0 @@ -.. important:: ``mongo`` Shell Method - - - This page documents the :binary:`~bin.mongo` shell method, and does - *not* refer to the MongoDB Node.js driver (or any other driver) - method. For corresponding MongoDB driver API, refer to your specific - :driver:`MongoDB driver ` documentation instead. diff --git a/source/includes/fact-mongosh-shell-method-toc.rst b/source/includes/fact-mongosh-shell-method-toc.rst new file mode 100644 index 00000000000..a3d73715e3b --- /dev/null +++ b/source/includes/fact-mongosh-shell-method-toc.rst @@ -0,0 +1,18 @@ +The methods listed on this table of contents page are +:mongosh:`mongosh ` methods. This is *not* the documention for +``Node.js`` or other programming language specific driver methods. + +In most cases :mongosh:`mongosh ` methods work the same way as the +legacy :binary:`~bin.mongo` shell methods. However, some legacy methods +are unavailable in ``mongosh``. + +For legacy :binary:`~bin.mongo` shell documention, refer to the +documentation for the corresponding ``MongoDB`` release. + +- :v4.4:`mongo shell v4.4 ` +- :v4.2:`mongo shell v4.2 ` +- :v4.0:`mongo shell v4.0 ` + +For MongoDB API drivers, refer to the language specific +:driver:`MongoDB driver ` documentation. + diff --git a/source/includes/fact-mongosh-shell-method.rst b/source/includes/fact-mongosh-shell-method.rst new file mode 100644 index 00000000000..ddf0ef3296b --- /dev/null +++ b/source/includes/fact-mongosh-shell-method.rst @@ -0,0 +1,20 @@ +.. important:: ``mongosh`` Method + + This is a :mongosh:`mongosh ` method. This is *not* the + documention for ``Node.js`` or other programming language specific + driver methods. + + In most cases :mongosh:`mongosh ` methods work the same way as + the legacy :binary:`~bin.mongo` shell methods. However, some legacy + methods are unavailable in ``mongosh``. + + For legacy :binary:`~bin.mongo` shell documention, refer to the + documentation for the corresponding ``MongoDB`` release. + + - :v4.4:`mongo shell v4.4 ` + - :v4.2:`mongo shell v4.2 ` + - :v4.0:`mongo shell v4.0 ` + + For MongoDB API drivers, refer to the language specific + :driver:`MongoDB driver ` documentation. + diff --git a/source/reference/method.txt b/source/reference/method.txt index 2f43ac8c27b..c44bcdf39a9 100644 --- a/source/reference/method.txt +++ b/source/reference/method.txt @@ -1,8 +1,8 @@ .. _js-administrative-methods: -======================= -``mongo`` Shell Methods -======================= +=================== +``mongosh`` Methods +=================== .. default-domain:: mongodb diff --git a/source/reference/method/cursor.addOption.txt b/source/reference/method/cursor.addOption.txt index fc1f4f67e4c..853cbc0d08f 100644 --- a/source/reference/method/cursor.addOption.txt +++ b/source/reference/method/cursor.addOption.txt @@ -16,7 +16,7 @@ Definition .. method:: cursor.addOption(flag) - .. include:: /includes/fact-mongo-shell-method.rst + .. include:: /includes/fact-mongosh-shell-method.rst .. include:: /includes/extracts/mongo-shell-deprecated-meta-operator-cursor-addOption.rst diff --git a/source/reference/method/cursor.allowDiskUse.txt b/source/reference/method/cursor.allowDiskUse.txt index 4409c757fab..443b11b80cd 100644 --- a/source/reference/method/cursor.allowDiskUse.txt +++ b/source/reference/method/cursor.allowDiskUse.txt @@ -18,7 +18,7 @@ Definition .. method:: cursor.allowDiskUse() - .. include:: /includes/fact-mongo-shell-method.rst + .. include:: /includes/fact-mongosh-shell-method.rst :method:`~cursor.allowDiskUse()` allows MongoDB to use temporary files on disk to store data exceeding the 100 megabyte system memory diff --git a/source/reference/method/cursor.allowPartialResults.txt b/source/reference/method/cursor.allowPartialResults.txt index 5e22dd2035a..a3750159fe3 100644 --- a/source/reference/method/cursor.allowPartialResults.txt +++ b/source/reference/method/cursor.allowPartialResults.txt @@ -15,7 +15,7 @@ Definition .. method:: cursor.allowPartialResults() - .. include:: /includes/fact-mongo-shell-method.rst + .. include:: /includes/fact-mongosh-shell-method.rst When used with :method:`db.collection.find()` operations against a sharded collection, returns partial results, rather than an error, diff --git a/source/reference/method/cursor.batchSize.txt b/source/reference/method/cursor.batchSize.txt index 2cb0892d81a..93547786119 100644 --- a/source/reference/method/cursor.batchSize.txt +++ b/source/reference/method/cursor.batchSize.txt @@ -16,7 +16,7 @@ Definition .. method:: cursor.batchSize(size) - .. include:: /includes/fact-mongo-shell-method.rst + .. include:: /includes/fact-mongosh-shell-method.rst Specifies the diff --git a/source/reference/method/cursor.close.txt b/source/reference/method/cursor.close.txt index 36307294453..87e3c93b80e 100644 --- a/source/reference/method/cursor.close.txt +++ b/source/reference/method/cursor.close.txt @@ -10,7 +10,7 @@ Definition .. method:: cursor.close() - .. include:: /includes/fact-mongo-shell-method.rst + .. include:: /includes/fact-mongosh-shell-method.rst Instructs the server to close a :ref:`cursor ` diff --git a/source/reference/method/cursor.collation.txt b/source/reference/method/cursor.collation.txt index 0d74f4eb45c..a954e83c020 100644 --- a/source/reference/method/cursor.collation.txt +++ b/source/reference/method/cursor.collation.txt @@ -18,7 +18,7 @@ Definition .. method:: cursor.collation() - .. include:: /includes/fact-mongo-shell-method.rst + .. include:: /includes/fact-mongosh-shell-method.rst .. versionadded:: 3.4 diff --git a/source/reference/method/cursor.comment.txt b/source/reference/method/cursor.comment.txt index 753544d76c2..2b3d0d1bbde 100644 --- a/source/reference/method/cursor.comment.txt +++ b/source/reference/method/cursor.comment.txt @@ -16,7 +16,7 @@ Definition .. method:: cursor.comment() - .. include:: /includes/fact-mongo-shell-method.rst + .. include:: /includes/fact-mongosh-shell-method.rst .. versionadded:: 3.2 diff --git a/source/reference/method/cursor.count.txt b/source/reference/method/cursor.count.txt index 8eee3268ae9..4975bee1c93 100644 --- a/source/reference/method/cursor.count.txt +++ b/source/reference/method/cursor.count.txt @@ -16,7 +16,7 @@ Definition .. method:: cursor.count() - .. include:: /includes/fact-mongo-shell-method.rst + .. include:: /includes/fact-mongosh-shell-method.rst .. note:: diff --git a/source/reference/method/cursor.explain.txt b/source/reference/method/cursor.explain.txt index b2622aea871..a924c1872c2 100644 --- a/source/reference/method/cursor.explain.txt +++ b/source/reference/method/cursor.explain.txt @@ -15,7 +15,7 @@ Definition .. method:: cursor.explain(verbosity) - .. include:: /includes/fact-mongo-shell-method.rst + .. include:: /includes/fact-mongosh-shell-method.rst Provides information on the query plan for the :method:`db.collection.find()` method. diff --git a/source/reference/method/cursor.forEach.txt b/source/reference/method/cursor.forEach.txt index dc512e30c6a..1c1f10aefb9 100644 --- a/source/reference/method/cursor.forEach.txt +++ b/source/reference/method/cursor.forEach.txt @@ -16,7 +16,7 @@ Description .. method:: cursor.forEach(function) - .. include:: /includes/fact-mongo-shell-method.rst + .. include:: /includes/fact-mongosh-shell-method.rst Iterates the cursor to apply a JavaScript ``function`` to each diff --git a/source/reference/method/cursor.hasNext.txt b/source/reference/method/cursor.hasNext.txt index ededa2734ca..140549f4603 100644 --- a/source/reference/method/cursor.hasNext.txt +++ b/source/reference/method/cursor.hasNext.txt @@ -13,7 +13,7 @@ cursor.hasNext() .. method:: cursor.hasNext() - .. include:: /includes/fact-mongo-shell-method.rst + .. include:: /includes/fact-mongosh-shell-method.rst :returns: Boolean. diff --git a/source/reference/method/cursor.hint.txt b/source/reference/method/cursor.hint.txt index 2bb1c02a400..75d175537d1 100644 --- a/source/reference/method/cursor.hint.txt +++ b/source/reference/method/cursor.hint.txt @@ -16,7 +16,7 @@ Definition .. method:: cursor.hint(index) - .. include:: /includes/fact-mongo-shell-method.rst + .. include:: /includes/fact-mongosh-shell-method.rst Call this method on a query to override MongoDB's default index diff --git a/source/reference/method/cursor.isClosed.txt b/source/reference/method/cursor.isClosed.txt index 82137362b97..42bbc2b187a 100644 --- a/source/reference/method/cursor.isClosed.txt +++ b/source/reference/method/cursor.isClosed.txt @@ -13,7 +13,7 @@ cursor.isClosed() .. method:: cursor.isClosed() - .. include:: /includes/fact-mongo-shell-method.rst + .. include:: /includes/fact-mongosh-shell-method.rst :returns: Boolean. diff --git a/source/reference/method/cursor.isExhausted.txt b/source/reference/method/cursor.isExhausted.txt index 0c9d5be4980..47b500024f4 100644 --- a/source/reference/method/cursor.isExhausted.txt +++ b/source/reference/method/cursor.isExhausted.txt @@ -13,7 +13,7 @@ cursor.isExhausted() .. method:: cursor.isExhausted() - .. include:: /includes/fact-mongo-shell-method.rst + .. include:: /includes/fact-mongosh-shell-method.rst :returns: Boolean. diff --git a/source/reference/method/cursor.itcount.txt b/source/reference/method/cursor.itcount.txt index 4caae29062d..4587626c1d9 100644 --- a/source/reference/method/cursor.itcount.txt +++ b/source/reference/method/cursor.itcount.txt @@ -16,7 +16,7 @@ Definition .. method:: cursor.itcount() - .. include:: /includes/fact-mongo-shell-method.rst + .. include:: /includes/fact-mongosh-shell-method.rst Counts the number of documents remaining in a cursor. diff --git a/source/reference/method/cursor.limit.txt b/source/reference/method/cursor.limit.txt index e5a6edf31ff..a983b3fde3c 100644 --- a/source/reference/method/cursor.limit.txt +++ b/source/reference/method/cursor.limit.txt @@ -16,7 +16,7 @@ Definition .. method:: cursor.limit() - .. include:: /includes/fact-mongo-shell-method.rst + .. include:: /includes/fact-mongosh-shell-method.rst Use the :method:`~cursor.limit()` method on a cursor to specify the maximum diff --git a/source/reference/method/cursor.map.txt b/source/reference/method/cursor.map.txt index 6b587ee3947..68536e28c1d 100644 --- a/source/reference/method/cursor.map.txt +++ b/source/reference/method/cursor.map.txt @@ -13,7 +13,7 @@ cursor.map() .. method:: cursor.map(function) - .. include:: /includes/fact-mongo-shell-method.rst + .. include:: /includes/fact-mongosh-shell-method.rst Applies ``function`` to each document visited by the cursor and diff --git a/source/reference/method/cursor.max.txt b/source/reference/method/cursor.max.txt index b7590910b13..c4bdb4b835b 100644 --- a/source/reference/method/cursor.max.txt +++ b/source/reference/method/cursor.max.txt @@ -16,7 +16,7 @@ Definition .. method:: cursor.max() - .. include:: /includes/fact-mongo-shell-method.rst + .. include:: /includes/fact-mongosh-shell-method.rst Specifies the *exclusive* upper bound for a specific index in order diff --git a/source/reference/method/cursor.maxTimeMS.txt b/source/reference/method/cursor.maxTimeMS.txt index 44e12954d72..046a52f5e0e 100644 --- a/source/reference/method/cursor.maxTimeMS.txt +++ b/source/reference/method/cursor.maxTimeMS.txt @@ -16,7 +16,7 @@ Definition .. method:: cursor.maxTimeMS(