Skip to content

Commit c9b7cfc

Browse files
authored
DOCSP-38145 mongoimport default db (#138)
* DOCSP-38145 mongoimport default db * fix ref * add note on non-existent db
1 parent d077ce1 commit c9b7cfc

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
If you don't specify a database with the :option:`--db <mongoimport --db>` or
2+
:option:`--uri <mongoimport --uri>` option, ``mongoimport`` uses the
3+
``test`` database by default. If the ``test`` database doesn't exist,
4+
``mongoimport`` creates the database.

source/mongoimport.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,11 @@ Options
214214
.. code-block:: none
215215

216216
--uri "mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]"
217-
217+
218+
.. note::
219+
220+
.. include:: /includes/fact-default-no-db-or-uri.rst
221+
218222
.. include:: /includes/extracts/uri-positional-mongoimport.rst
219223

220224
For information on the components of the connection string, see
@@ -451,6 +455,9 @@ Options
451455

452456
.. include:: /includes/extracts/uri-used-with-db.rst
453457

458+
.. note::
459+
460+
.. include:: /includes/fact-default-no-db-or-uri.rst
454461

455462
.. option:: --collection=<collection>, -c=<collection>
456463

0 commit comments

Comments
 (0)