Skip to content

Commit 37049d8

Browse files
authored
Add help for connections/pretty/ExplainableCursor (#228)
1 parent 49bc725 commit 37049d8

File tree

1 file changed

+43
-6
lines changed

1 file changed

+43
-6
lines changed

packages/i18n/src/locales/en_US.js

Lines changed: 43 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,21 @@ const translations = {
8989
description: 'result of the last line evaluated; use to further iterate'
9090
},
9191
exit: {
92-
description: 'Quit the MongoDB shell with .exit'
92+
description: 'Quit the MongoDB shell with exit/exit()/.exit'
93+
},
94+
quit: {
95+
description: 'Quit the MongoDB shell with quit/quit()'
9396
},
9497
show: {
9598
description: '\'show databases\': Print a list of all available databases. \n\'show-collections\': Print a list of all collections for current database'
99+
},
100+
connect: {
101+
description: 'Create a new connection and return the Database object. Usage: connect(URI, username [optional], password [optional])',
102+
link: 'https://docs.mongodb.com/manual/reference/method/connect'
103+
},
104+
Mongo: {
105+
description: 'Create a new connection and return the Mongo object. Usage: new Mongo(URI, options [optional])',
106+
link: 'https://docs.mongodb.com/manual/reference/method/Mongo/#Mongo'
96107
}
97108
}
98109
}
@@ -155,7 +166,10 @@ const translations = {
155166
link: 'https://docs.mongodb.com/manual/reference/method/cursor.toArray',
156167
description: 'The toArray() method returns an array that contains all the documents from a cursor. The method iterates completely the cursor, loading all the documents into RAM and exhausting the cursor.',
157168
example: 'db.collection.aggregate(pipeline, options).toArray()'
158-
}
169+
},
170+
pretty: {
171+
description: 'Deprecated. The shell provides auto-formatting so this method is no longer useful'
172+
}
159173
}
160174
}
161175
},
@@ -1360,10 +1374,7 @@ const translations = {
13601374
},
13611375
// don't document since everything is currently pretty printed
13621376
pretty: {
1363-
link: '',
1364-
description: '',
1365-
example: '',
1366-
parameters: {}
1377+
description: 'Deprecated. The shell provides auto-formatting so this method is no longer useful'
13671378
},
13681379
readConcern: {
13691380
link: 'https://docs.mongodb.com/manual/reference/method/cursor.readConcern',
@@ -1491,6 +1502,12 @@ const translations = {
14911502
description: 'Removes the current database, deleting the associated data files.',
14921503
example: 'db.dropDatabase()',
14931504
parameters: {}
1505+
},
1506+
getMongo: {
1507+
link: 'https://docs.mongodb.com/manual/reference/method/db.getMongo/',
1508+
description: 'Returns the current database connection',
1509+
example: 'connection = db.getMongo()',
1510+
parameters: {}
14941511
}
14951512
}
14961513
}
@@ -1532,6 +1549,15 @@ const translations = {
15321549
}
15331550
}
15341551
},
1552+
ExplainableCursor: {
1553+
iteration: {
1554+
'no-cursor': 'no cursor',
1555+
'type-it-for-more': 'Type "it" for more'
1556+
},
1557+
help: {
1558+
description: 'Explainable Cursor. See the Cursor class help methods for more information'
1559+
}
1560+
},
15351561
ReplicaSet: {
15361562
help: {
15371563
description: 'Replica Set Class'
@@ -1541,6 +1567,17 @@ const translations = {
15411567
help: {
15421568
description: 'The Shard Class'
15431569
}
1570+
},
1571+
Mongo: {
1572+
help: {
1573+
description: 'The Mongo Class. Represents a connection to a server',
1574+
link: 'https://docs.mongodb.com/manual/reference/method/Mongo/#Mongo'
1575+
},
1576+
attributes: {
1577+
getDB: {
1578+
description: 'Returns the specified Database of the Mongo object.'
1579+
}
1580+
}
15441581
}
15451582
}
15461583
},

0 commit comments

Comments
 (0)