Method MongoDB.opIndex

Accesses the collections inside this DB.

Prototype

MongoCollection opIndex(
  string name
);

Examples

auto db = connectMongoDB("mongodb://localhost/mydatabase");
auto col = db["mycollection"];

auto db = connectMongoDB("mongodb://localhost");
auto col = db["mydatabase.mycollection"];

Throws

Exception if a DB communication error occured.

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.