翻译或纠错本页面
- Reference >
- mongo Shell Methods >
- 数据库相关方法 >
- db.getCollection()
db.getCollection()¶
Description¶
- db.getCollection(name)¶
Returns a collection name. This is useful for a collection whose name might interact with the shell itself, such names that begin with _ or that mirror the database commands.
The db.getCollection() method has the following parameter:
Parameter Type Description name string The name of the collection.