def _delete_collection(self, ctx):
assert isinstance(ctx, ResourceQueryContext)<EOL>filter_by = ctx.get_filter_by()<EOL>q = self._orm.query(self.model_cls)<EOL>if filter_by is not None:<EOL><INDENT>q = self.to_filter(q, filter_by)<EOL><DEDENT>return q.delete()<EOL>
Delete a collection from DB, optionally filtered by ``filter_by``