- Reference >
mongo
Shell Methods >- Database Methods >
- db.getCollectionInfos()
db.getCollectionInfos()¶
On this page
Definition¶
-
db.
getCollectionInfos
()¶ New in version 3.0.0.
Returns an array of documents with collection information, i.e. collection name and options, for the current database.
The
db.getCollectionInfos()
helper wraps thelistCollections
command.
Example¶
The following returns information for all collections in the
records
database:
The method returns an array of documents that contain collection information: