Method: Mongo::Database::View#list_collections
- Defined in:
- lib/mongo/database/view.rb
#list_collections(options = {}) ⇒ Array<Hash>
Note:
The set of collections returned, and the schema of the information hash per collection, depends on the MongoDB server version that fulfills the request.
Get info on all the collections in the database.
129 130 131 132 |
# File 'lib/mongo/database/view.rb', line 129 def list_collections( = {}) session = client.get_session() collections_info(session, ServerSelector.primary, ) end |