Always fetch column info from the server, even if there are no rows.
parent
a92d4841d1
commit
f08aa6a313
|
@ -718,16 +718,17 @@ Polling result for (Query-id: {query_id})""".format(query_id=self.__async_query_
|
||||||
|
|
||||||
status = self._wait_timeout(self.conn, ASYNC_WAIT_TIMEOUT)
|
status = self._wait_timeout(self.conn, ASYNC_WAIT_TIMEOUT)
|
||||||
if status == self.ASYNC_OK:
|
if status == self.ASYNC_OK:
|
||||||
|
# Fetch the column information
|
||||||
|
colinfo = [desc for desc in cur.description]
|
||||||
|
|
||||||
if cur.rowcount > 0:
|
if cur.rowcount > 0:
|
||||||
# Fetch the column information
|
|
||||||
colinfo = [desc for desc in cur.description]
|
|
||||||
result = []
|
result = []
|
||||||
# Fetch the data rows.
|
# Fetch the data rows.
|
||||||
for row in cur:
|
for row in cur:
|
||||||
result.append(dict(row))
|
result.append(dict(row))
|
||||||
self.__async_cursor = None
|
self.__async_cursor = None
|
||||||
return status, result, colinfo
|
return status, result, colinfo
|
||||||
return status, None, None
|
return status, None, colinfo
|
||||||
|
|
||||||
def cancel_transaction(self, conn_id, did=None):
|
def cancel_transaction(self, conn_id, did=None):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue