Method MongoDB.getCollection
Prototype
MongoCollection getCollection( string db_and_col );
Return
MongoCollection for the given database and collecting specified.
If a default database has been set in the MongoClientSettings it is NOT used here. The full database.collection path must be specified.
Example
auto col = db.getCollection("mydb.mycollection");
The opIndex
function should be used to get a relative collection name where the default database is taken into consideration.
Most user code should use opIndex
.
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.