Navigation
This version of the manual is no longer supported.

db.getCollection()

On this page

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.