License
Subject to the terms of the MIT license, as written in the included LICENSE.txt file.
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.
Represents a single database accessible through a given MongoClient.
MongoClient client() @property @safeThe client which represents the connection to the database serverReadConcern readConcern() @safe constThe read concern for this database, inherited from the client unless overridden.MongoDatabase withReadConcern(ReadConcern rc) @safeReturns a copy of this database with the given read concern.MongoErrorDescription getLastError() @safeRetrieves the last error code (if any) from the database server.Bson getLog(string mask) @safeReturns recent log messages for this database from the database server.Bson runCommand(T)(T command_and_options,
string errorInfo = __FUNCTION__, string errorFile = __FILE__, size_t errorLine = __LINE__) @safeBson runCommandChecked(T, ExceptionT = MongoDriverException)(
T command_and_options,
string errorInfo = __FUNCTION__,
string errorFile = __FILE__,
size_t errorLine = __LINE__
) @safeGeneric 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__
) @safedittoMongoCursor!R runListCommand(R = Bson, T)(T command_and_options, int batchSize = 0, Duration getMoreMaxTime = Duration.max) @safedittothis(MongoClient client, string name)