<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def n1qlQueryAll(self, *args, **kwargs):
 """ Execute a N1QL query, retrieving all rows. This method returns a :class:`Deferred` object which is executed with a :class:`~.N1QLRequest` object. The object may be iterated over to yield the rows in the result set. This method is similar to :meth:`~couchbase.bucket.Bucket.n1ql_query` in its arguments. Example:: def handler(req):
 for row in req: d = cb.n1qlQueryAll('SELECT * from `travel-sample` WHERE city=$1`, 'Reno') d.addCallback(handler) :return: A :class:`Deferred` .. seealso:: :meth:`~couchbase.bucket.Bucket.n1ql_query` """

        if not self.connected:
            cb = lambda x: self.n1qlQueryAll(*args, **kwargs)
            return self.connect().addCallback(cb)

        kwargs['itercls'] = BatchedN1QLRequest
        o = super(RawBucket, self).n1ql_query(*args, **kwargs)
        o.start()
        return o._getDeferred()