Method MongoClient.getCollection
Accesses a collection using an absolute path
.
The full database.collection path
must be specified. To access collections using a path
relative to their database, use getDatabase
in conjunction with MongoDatabase.opIndex.
Prototype
MongoCollection getCollection( string path );
Returns
MongoCollection for the given combined database and collectiion name(path
)
Examples
auto col = client.getCollection("test.collection");
Authors
Sönke Ludwig
Copyright
© 2012 RejectedSoftware e.K.
License
Subject to the terms of the MIT license, as written in the included LICENSE.txt file.