(cls, db, offset=None, limit=None, **kwargs)
Query by attributes iteratively. Ordering is not supported
        Example:
            User.get_by(db, age=[32, 54])
            User.get_by(db, age=23, name="guido")
Query by attributes iteratively. Ordering is not supported
        Example:
            User.get_by(db, age=[32, 54])
            User.get_by(db, age=23, name="guido")
Query by attributes iteratively . Ordering is not supported Example : User . get_by ( db age = [ 32 54 ] ) User . get_by ( db age = 23 name = guido )
async def filter_by(cls, db, offset=None, limit=None, **kwargs):
        """Query by attributes iteratively. Ordering is not supported
        Example:
            User.get_by(db, age=[32, 54])
            User.get_by(db, age=23, name="guido")

        """
        if limit and type(limit) is not int:
            raise InvalidQuery('If limit is supplied it must be an int')
        if offset and type(offset) is not int:
            raise InvalidQuery('If offset is supplied it must be an int')

        ids_to_iterate = await cls._get_ids_filter_by(db, **kwargs)
        if offset:
            # Using offset without order_by is pretty strange, but allowed
            if limit:
                ids_to_iterate = ids_to_iterate[offset:offset+limit]
            else:
                ids_to_iterate = ids_to_iterate[offset:]
        elif limit:
            ids_to_iterate = ids_to_iterate[:limit]

        for key in ids_to_iterate:
            yield await cls.load(db, key)
async def filter_by ( cls , db , offset = None , limit = None , * * kwargs ) : if limit and type ( limit ) is not int : raise InvalidQuery ( 'If limit is supplied it must be an int' ) if offset and type ( offset ) is not int : raise InvalidQuery ( 'If offset is supplied it must be an int' ) ids_to_iterate = await cls . _get_ids_filter_by ( db , * * kwargs ) if offset : # Using offset without order_by is pretty strange, but allowed if limit : ids_to_iterate = ids_to_iterate [ offset : offset + limit ] else : ids_to_iterate = ids_to_iterate [ offset : ] elif limit : ids_to_iterate = ids_to_iterate [ : limit ] for key in ids_to_iterate : yield await cls . load ( db , key )