jeroen / mongolite

Fast and Simple MongoDB Client for R
https://jeroen.github.io/mongolite/
286 stars 65 forks source link

Documentation doesn't match implementation (remove multiple documents) #124

Closed joerixaop closed 6 years ago

joerixaop commented 6 years ago

The documentation lists

‘remove(query = "{}", multiple = FALSE)’ Remove record(s) matching ‘query’ from the collection.

When trying to set the multiple parameter to TRUE I get the following error

Error in coll$remove(query = paste("{\"transaction_id\":", jsonlite::toJSON(jsonlite::unbox(opt$transaction_id)),  : 
unused argument (multiple = T)

Looking further it seems the argument is just_one and defaults to false, which differs from the parameters to find

When starting to write this issue I didn't know which was wrong (docs or code), but looking at the code it changed in 1.2 from multiple to just_one, but without announcing it in NEWS, or updating the documentation, so presumably it's the documentation that's wrong.