vibe.d beta banner
get vibe.d

Asynchronous I/O that doesn’t get in your way, written in D

Function MongoDatabase.runCommandUnchecked

Generic means to run commands on the database.

Bson runCommandUnchecked(T, ExceptionT) (
  T command_and_options,
  string errorInfo = __FUNCTION__,
  string errorFile = __FILE__,
  size_t errorLine = __LINE__

See for a list of possible values for command_and_options.

Note that some commands return a cursor instead of a single document. In this case, use runListCommand instead of runCommandChecked or runCommandUnchecked to be able to properly iterate over the results.

Usually commands respond with a double ok field in them, the Checked version of this function checks that they equal to 1.0. The Unchecked version of this function does not check that parameter.

With cursor functions on runListCommand the error checking is well defined.


command_and_options Bson object containing the command to be executed as well as the command parameters as fields


The raw response of the MongoDB server


Sönke Ludwig


© 2012-2014 Sönke Ludwig


Subject to the terms of the MIT license, as written in the included LICENSE.txt file.