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

Support remove queries #12

Open
fsouza opened this issue May 17, 2011 · 3 comments
Open

Support remove queries #12

fsouza opened this issue May 17, 2011 · 3 comments
Labels
Milestone

Comments

@fsouza
Copy link
Contributor

fsouza commented May 17, 2011

Add support to remove queries

@fsouza fsouza closed this as completed May 17, 2011
@fsouza fsouza reopened this May 17, 2011
@fsouza
Copy link
Contributor Author

fsouza commented May 17, 2011

We can do on normal query:

Person.query.filter({'first_name' : 'John'}).remove_all()

@fsouza fsouza closed this as completed May 17, 2011
@zqkou
Copy link

zqkou commented Sep 1, 2017

I tried with:
Person.query.filter({'first_name' : 'John'}).remove_all()

But get following error message:
TypeError: remove_all() takes at least 2 arguments (1 given)

What am I missing here? Thanks!

@fsouza
Copy link
Contributor Author

fsouza commented Sep 1, 2017

@zqkou it looks like mongoalchemy now requires a qfield on remove_all. A qfield is an instance of mongoalchemy.QueryField: http://www.mongoalchemy.org/api/expressions/update_expressions.html#mongoalchemy.update_expression.UpdateExpression.remove_all

I'm not very familiar with the recent versions of mongoalchemy, but I can try to dig this up later. I'll reopen this issue.

@fsouza fsouza reopened this Sep 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants