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

Implement findOneAndDelete command #319

Closed
maheshrajamani opened this issue Mar 30, 2023 · 0 comments · Fixed by #332
Closed

Implement findOneAndDelete command #319

maheshrajamani opened this issue Mar 30, 2023 · 0 comments · Fixed by #332
Assignees

Comments

@maheshrajamani
Copy link
Contributor

maheshrajamani commented Mar 30, 2023

Deletes a single document based on the filter and sort criteria, returning the deleted document.
The command accepts filter clause, sort clause and projection to be applied for the response document that was deleted
Sample request:
{ "findOneAndDelete": { "filter": {"location": "London"}, "sort" : ["race.start_date"], "projection" : {"location": 1} } }

Sample Response:
{ "data": { "docs": [ { "_id": "1", "location": "New York", "count": 3 } ], "count": 1, "status": { "deletedCount": 1 } } }

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