mongo.simple.command: Issue a simple.command to a database on MongoDB server

Description Usage Arguments Details Value See Also Examples

View source: R/mongo.R

Description

Issue a simple command to a MongoDB server and return the response from the server.

Usage

1
mongo.simple.command(mongo, db, cmdstr, arg)

Arguments

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).

Details

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.

Value

NULL if the command failed. Use mongo.get.last.err() to determine the cause.

(mongo.bson) The server's response if successful.

See Also

mongo.command,
mongo.rename,
mongo.count,
mongo.drop.database,
mongo.drop,
mongo,
mongo.bson.

Examples

1
2
3
4
5
6

jonkatz2/rmongodb documentation built on May 19, 2019, 7:30 p.m.