def filter(self, cls_or_collection, query, raw=False, only=None):

        if not isinstance(cls_or_collection, six.string_types):
            collection = self.get_collection_for_cls(cls_or_collection)
            cls = cls_or_collection
        else:
            collection = cls_or_collection
            cls = self.get_cls_for_collection(collection)

        canonical_query = self._canonicalize_query(query)

        args = {}

        if only:
            if isinstance(only,tuple):
                args['projection'] = list(only)
            else:
                args['projection'] = only

        return QuerySet(self, cls, self.db[collection].find(canonical_query, **args), raw=raw, only=only)
Destroy all representations.
dataset/ETHPy150Open adewes/blitzdb/blitzdb/backends/mongo/backend.py/Backend.filter--crossover with--dataset/ETHPy150Open typesupply/defcon/Lib/defcon/objects/glyph.py/Glyph.destroyAllRepresentations