Description Usage Arguments Details Value See Also Examples
Issue a simple command to a MongoDB server and return the response from the server.
1 | mongo.simple.command(mongo, db, cmdstr, arg)
|
mongo |
(mongo) A mongo connection object. |
db |
(string) The name of the database upon which to perform the command. |
cmdstr |
(string) The name of the command. |
arg |
An argument to the command, may be a string or numeric (as.integer). |
This function supports many of the MongoDB database commands by allowing you to specify a simple command object which is entirely specified by the command name and an integer or string argument.
See http://www.mongodb.org/display/DOCS/List+of+Database+Commands.
NULL if the command failed. Use mongo.get.last.err()
to determine the cause.
(mongo.bson) The server's response if successful.
mongo.command
,
mongo.rename
,
mongo.count
,
mongo.drop.database
,
mongo.drop
,
mongo,
mongo.bson.
1 2 3 4 5 6 | mongo <- mongo.create()
if (mongo.is.connected(mongo)) {
print(mongo.simple.command(mongo, "admin", "buildInfo", 1))
mongo.destroy(mongo)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.