Skip to content
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

Remove only one document? #60

Closed
abeboparebop opened this issue Jun 3, 2013 · 0 comments · Fixed by #63
Closed

Remove only one document? #60

abeboparebop opened this issue Jun 3, 2013 · 0 comments · Fixed by #63

Comments

@abeboparebop
Copy link

The .remove() command in mongojs does not seem to obey the Mongo spec in removing only one document. The following is from the Mongo documentation:

The following operation deletes a single document from the bios collection where the turing field equals true:

db.bios.remove( { turing: true }, 1 )

but this doesn't seem to be properly implemented in mongojs -- instead, all documents that match the query are deleted.

(I also can't find any documentation for what the callback function in .remove() returns for "value." I'm interpreting it as the number of documents that matched the condition and were deleted.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant