Browse files

added comments for new methods

  • Loading branch information...
1 parent 245c0d1 commit 1cc3eb45645c469fa4b1725a97d11a8351b4934f @tc committed Jul 8, 2012
Showing with 107 additions and 0 deletions.
  1. +36 −0 man/dbGetDistinct-methods.Rd
  2. +39 −0 man/dbGetQueryForKeys-methods.Rd
  3. +32 −0 man/dbRemoveQuery-methods.Rd
View
36 man/dbGetDistinct-methods.Rd
@@ -0,0 +1,36 @@
+\name{dbGetDistinct-methods}
+\docType{methods}
+\alias{dbGetDistinct}
+\alias{dbGetDistinct-methods}
+\alias{dbGetDistinct,RMongo,character,character-method}
+\alias{dbGetDistinct,RMongo,character,character,missing,missing-method}
+\alias{dbGetDistinct,RMongo,character,character,numeric,numeric-method}
+
+\title{Performing a distinct MongoDB query}
+
+\description{
+Send a json query to mongodb.
+The output is a data.frame object and will work properly only if the mongoDB collection contains primitive data types. It may not work properly if there are any embedded documents or arrays.
+}
+
+\usage{
+ dbGetDistinct(rmongo.object, collection, query)
+}
+
+\arguments{
+ \item{rmongo.object}{The RMongo object.}
+ \item{collection}{The name of the collection the query is being performed upon.}
+ \item{query}{A JSON string query. See http://www.mongodb.org/display/DOCS/Advanced+Queries for more information on the MongoDB query language.}
+}
+
+\seealso{
+ \code{\link{mongoDbConnect}}
+}
+\examples{
+ mongo <- mongoDbConnect("test")
+ output <- dbInsertDocument(mongo, "test_data", '{"foo": "bar"}')
+ output <- dbInsertDocument(mongo, "test_data", '{"foo": "bar"}')
+ output <- dbGetDistinct(mongo, 'test_data', '{"foo": "bar"}')
+ print(output)
+}
+
View
39 man/dbGetQueryForKeys-methods.Rd
@@ -0,0 +1,39 @@
+\name{dbGetQueryForKeys-methods}
+\docType{methods}
+\alias{dbGetQueryForKeys}
+\alias{dbGetQueryForKeys-methods}
+\alias{dbGetQueryForKeys,RMongo,character,character,character-method}
+\alias{dbGetQueryForKeys,RMongo,character,character,character,missing,missing-method}
+\alias{dbGetQueryForKeys,RMongo,character,character,character,numeric,numeric-method}
+
+\title{Performing a MongoDB query and only return back certain keys}
+
+\description{
+Send a json query to mongodb.
+The output is a data.frame object and will work properly only if the mongoDB collection contains primitive data types. It may not work properly if there are any embedded documents or arrays.
+}
+
+\usage{
+ dbGetQueryForKeys(rmongo.object, collection, query, keys. skip=0, limit=1000)
+}
+
+\arguments{
+ \item{rmongo.object}{The RMongo object.}
+ \item{collection}{The name of the collection the query is being performed upon.}
+ \item{query}{A JSON string query. See http://www.mongodb.org/display/DOCS/Advanced+Queries for more information on the MongoDB query language.}
+ \item{keys}{A JSON string query. See http://www.mongodb.org/display/DOCS/Advanced+Queries for more information on the MongoDB query language.}
+ \item{skip}{Offset the resultset. Can be used with limit to perform pagination.}
+ \item{limit}{Limits the resultset size.}
+}
+
+\seealso{
+ \code{\link{mongoDbConnect}}
+}
+\examples{
+ mongo <- mongoDbConnect("test")
+ output <- dbInsertDocument(mongo, "test_data", '{"foo": "bar"}')
+ output <- dbGetQueryForKeys(mongo, 'test_data', '{"foo": "bar"}', '{"foo":1}')
+ print(output)
+
+}
+
View
32 man/dbRemoveQuery-methods.Rd
@@ -0,0 +1,32 @@
+\name{dbRemoveQuery-methods}
+\docType{methods}
+\alias{dbRemoveQuery}
+\alias{dbRemoveQuery-methods}
+\alias{dbRemoveQuery,RMongo,character,character-method}
+
+\title{Performing a delete MongoDB query}
+
+\description{
+Send a json query to mongodb.
+}
+
+\usage{
+ dbRemoveQuery(rmongo.object, collection, query)
+}
+
+\arguments{
+ \item{rmongo.object}{The RMongo object.}
+ \item{collection}{The name of the collection the query is being performed upon.}
+ \item{query}{A JSON string query. See http://www.mongodb.org/display/DOCS/Advanced+Queries for more information on the MongoDB query language.}
+}
+
+\seealso{
+ \code{\link{mongoDbConnect}}
+}
+\examples{
+ mongo <- mongoDbConnect("test")
+ output <- dbInsertDocument(mongo, "test_data", '{"foo": "bar"}')
+ output <- dbRemoveQuery(mongo, 'test_data', '{"foo": "bar"}')
+ print(output)
+}
+

0 comments on commit 1cc3eb4

Please sign in to comment.