Created
July 10, 2011 00:22
-
-
Save s9tpepper/1074091 to your computer and use it in GitHub Desktop.
Using the runCommand() method
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* All the commands can be executing with the Document object. Simple | |
commands such as "getLastError" are run as below. The Document requires | |
a colon in all entries using shorthand, thus "getLastError:" */ | |
mongo.db("myDatabase").runCommand(new Document("getLastError:")).addOnce(onLastError); | |
function onLastError(opReply:OpReply):void | |
{ | |
// The command response document will be in the first element | |
// of the documents Array in the OpReply object. The structure | |
// of the document will depend on the command executed. | |
var document:Object = opReply.documents[0]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment