

def queryEx(self, viewcls, *args, **kwargs):
    '\n        Query a view, with the ``viewcls`` instance receiving events\n        of the query as they arrive.\n\n        :param type viewcls: A class (derived from :class:`AsyncViewBase`)\n          to instantiate\n\n        Other arguments are passed to the standard `query` method.\n\n        This functions exactly like the :meth:`~couchbase.async.AsyncBucket.query`\n        method, except it automatically schedules operations if the connection\n        has not yet been negotiated.\n        '
    kwargs['itercls'] = viewcls
    o = super(AsyncBucket, self).query(*args, **kwargs)
    if (not self.connected):
        self.connect().addCallback((lambda x: o.start()))
    else:
        o.start()
    return o

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