

def n1qlQueryAll(self, *args, **kwargs):
    "\n        Execute a N1QL query, retrieving all rows.\n\n        This method returns a :class:`Deferred` object which is executed\n        with a :class:`~.N1QLRequest` object. The object may be iterated\n        over to yield the rows in the result set.\n\n        This method is similar to :meth:`~couchbase.bucket.Bucket.n1ql_query`\n        in its arguments.\n\n        Example::\n\n            def handler(req):\n                for row in req:\n                    # ... handle row\n\n            d = cb.n1qlQueryAll('SELECT * from `travel-sample` WHERE city=$1`,\n                            'Reno')\n            d.addCallback(handler)\n\n        :return: A :class:`Deferred`\n\n        .. seealso:: :meth:`~couchbase.bucket.Bucket.n1ql_query`\n        "
    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()

dataset/ETHPy150Open couchbase/couchbase-python-client/txcouchbase/bucket.py RawBucket.n1qlQueryAll/original