-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dbInsertDocument not supporting array of document #22
Comments
I suspect line 64 of RMongo / src / r-mongo-scala / src / main / scala / rmongo / RMongo.scala 64: JSON.parse(query).asInstanceOf[DBObject] |
To make this fix, i think you'll need to make another function named Additionally, it helps to add a unit test to verify the fix. To compile and
You'll need Maven 3/Java 7+ installed. On Mon, Oct 28, 2013 at 12:22 AM, RockScience [email protected]:
Tommy Chheng |
Any progress on this? Being able to send arrays of documents without a loop is a native feature of mongodb API which is very important for a scripting language like R. |
Hi, if you submit a pull request with the suggested changes above, i'll be more than happy to review and merge. |
Is dbInsertDocument a simple wrapper of db.collection.insert() ?
According to http://docs.mongodb.org/manual/reference/method/db.collection.insert/#db.collection.insert it should support batch sending from an array of document:
[document1, document2, ..., documentN]
This is important because R is not a compiled language and doesn't deal well with loops. Hence not being able to send a batch of documents will create unnecessary delays.
See also StackOverflow question:
http://stackoverflow.com/questions/19564321/how-to-send-multiple-documents-using-rmongo
The text was updated successfully, but these errors were encountered: