Implement Cursor.delete()
ramnes opened this issue · 0 comments
ramnes commented
So that we can remove a bunch of documents that exist from a cursor.
This is useful when we want to reuse a cursor rather than writing a new remove
query.
For example:
class Foo(Thingy):
def get_bars(self):
return Bar.find({"foo_id": self.id})
def delete_bars(self):
return self.get_bars().delete()