Description Usage Arguments See Also Examples
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.
| 1 |   dbGetQuery(rmongo.object, collection, query, skip=0, limit=1000) 
 | 
| rmongo.object | The RMongo object. | 
| collection | The name of the collection the query is being performed upon. | 
| query | A JSON string query. See http://www.mongodb.org/display/DOCS/Advanced+Queries for more information on the MongoDB query language. | 
| skip | Offset the resultset. Can be used with limit to perform pagination. | 
| limit | Limits the resultset size. | 
| 1 2 3 4 5 6 7 |   mongo <- mongoDbConnect("test")
  output <- dbInsertDocument(mongo, "test_data", '{"foo": "bar"}')  
  output <- dbGetQuery(mongo, 'test_data', '{"foo": "bar"}')
  print(output)
  
  output <- dbInsertDocument(mongo, "test_data", '{"foo": "bar with spaces"}')
  output <- dbGetQuery(mongo, 'test_data', '{"foo": { "$regex": "bar*", "$options": "i"} }')
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.