#NEWLINE# def n1ql_query( self , query , * args , **kwargs ) : #NEWLINE# #INDENT# '\n        Execute a N1QL query.\n\n        This method is mainly a wrapper around the :class:`~.N1QLQuery`\n        and :class:`~.N1QLRequest` objects, which contain the inputs\n        and outputs of the query.\n\n        Using an explicit :class:`~.N1QLQuery`::\n\n            query = N1QLQuery(\n                \'SELECT airportname FROM `travel-sample` WHERE city=$1\', "Reno")\n            # Use this option for often-repeated queries\n            query.adhoc = False\n            for row in cb.n1ql_query(query):\n                print \'Name: {0}\'.format(row[\'airportname\'])\n\n        Using an implicit :class:`~.N1QLQuery`::\n\n            for row in cb.n1ql_query(\n                \'SELECT airportname, FROM `travel-sample` WHERE city=$1\', "Reno"):\n                print \'Name: {0}\'.format(row[\'airportname\'])\n\n        :param query: The query to execute. This may either be a\n            :class:`.N1QLQuery` object, or a string (which will be\n            implicitly converted to one).\n        :param kwargs: Arguments for :class:`.N1QLRequest`.\n        :return: An iterator which yields rows. Each row is a dictionary\n            representing a single result\n        ' #NEWLINE# if ( not isinstance ( query , N1QLQuery ) ) : #NEWLINE# #INDENT# query = N1QLQuery ( itercls ) #NEWLINE# #UNINDENT# itercls = kwargs . pop ( 'itercls' , N1QLRequest ) #NEWLINE# return itercls ( query , self , * args , ** kwargs )