vibe.db.mongo.database

MongoDatabase class representing common database for group of collections.

Technically it is very special collection with common query functions disabled and some service commands provided.

Types 1

Represents a single database accessible through a given MongoClient.

Fields
string m_name
MongoClient m_client
Methods
string name() @propertyThe name of this database
MongoClient client() @propertyThe client which represents the connection to the database server
MongoCollection opIndex(string name)Accesses the collections of this database.
MongoErrorDescription getLastError()Retrieves the last error code (if any) from the database server.
Bson getLog(string mask)Returns recent log messages for this database from the database server.
Bson fsync(bool async = false)Performs a filesystem/disk sync of the database on the server.
Bson runCommand(T)(T command_and_options, string errorInfo = __FUNCTION__, string errorFile = __FILE__, size_t errorLine = __LINE__)
Bson runCommandChecked(T, ExceptionT = MongoDriverException)( T command_and_options, string errorInfo = __FUNCTION__, string errorFile = __FILE__, size_t errorLine = __LINE__ )Generic means to run commands on the database.
Bson runCommandUnchecked(T, ExceptionT = MongoDriverException)( T command_and_options, string errorInfo = __FUNCTION__, string errorFile = __FILE__, size_t errorLine = __LINE__ )ditto
MongoCursor!R runListCommand(R = Bson, T)(T command_and_options, int batchSize = 0, Duration getMoreMaxTime = Duration.max)ditto
Constructors
this(MongoClient client, string name)