[TD-2768]feature:4x py fetch performance increase

This commit is contained in:
liuyq-617 2021-01-15 18:03:00 +08:00
parent 8d154657cb
commit d3f97ba000
8 changed files with 12 additions and 12 deletions

View File

@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
setuptools.setup(
name="taos",
version="2.0.3",
version="2.0.4",
author="Taosdata Inc.",
author_email="support@taosdata.com",
description="TDengine python client package",

View File

@ -184,7 +184,7 @@ class TDengineCursor(object):
return False
def fetchall(self):
def fetchall_row(self):
"""Fetch all (remaining) rows of a query result, returning them as a sequence of sequences (e.g. a list of tuples). Note that the cursor's arraysize attribute can affect the performance of this operation.
"""
if self._result is None or self._fields is None:
@ -203,7 +203,7 @@ class TDengineCursor(object):
for i in range(len(self._fields)):
buffer[i].extend(block[i])
return list(map(tuple, zip(*buffer)))
def fetchall_block(self):
def fetchall(self):
if self._result is None or self._fields is None:
raise OperationalError("Invalid use of fetchall")

View File

@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
setuptools.setup(
name="taos",
version="2.0.3",
version="2.0.4",
author="Taosdata Inc.",
author_email="support@taosdata.com",
description="TDengine python client package",

View File

@ -192,7 +192,7 @@ class TDengineCursor(object):
return False
def fetchall(self):
def fetchall_row(self):
"""Fetch all (remaining) rows of a query result, returning them as a sequence of sequences (e.g. a list of tuples). Note that the cursor's arraysize attribute can affect the performance of this operation.
"""
if self._result is None or self._fields is None:
@ -212,7 +212,7 @@ class TDengineCursor(object):
buffer[i].extend(block[i])
return list(map(tuple, zip(*buffer)))
def fetchall_block(self):
def fetchall(self):
if self._result is None or self._fields is None:
raise OperationalError("Invalid use of fetchall")

View File

@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
setuptools.setup(
name="taos",
version="2.0.3",
version="2.0.4",
author="Taosdata Inc.",
author_email="support@taosdata.com",
description="TDengine python client package",

View File

@ -138,7 +138,7 @@ class TDengineCursor(object):
def fetchmany(self):
pass
def fetchall(self):
def fetchall_row(self):
"""Fetch all (remaining) rows of a query result, returning them as a sequence of sequences (e.g. a list of tuples). Note that the cursor's arraysize attribute can affect the performance of this operation.
"""
if self._result is None or self._fields is None:
@ -158,7 +158,7 @@ class TDengineCursor(object):
buffer[i].extend(block[i])
return list(map(tuple, zip(*buffer)))
def fetchall_block(self):
def fetchall(self):
if self._result is None or self._fields is None:
raise OperationalError("Invalid use of fetchall")

View File

@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
setuptools.setup(
name="taos",
version="2.0.3",
version="2.0.4",
author="Taosdata Inc.",
author_email="support@taosdata.com",
description="TDengine python client package",

View File

@ -139,7 +139,7 @@ class TDengineCursor(object):
def fetchmany(self):
pass
def fetchall(self):
def fetchall_row(self):
"""Fetch all (remaining) rows of a query result, returning them as a sequence of sequences (e.g. a list of tuples). Note that the cursor's arraysize attribute can affect the performance of this operation.
"""
if self._result is None or self._fields is None:
@ -159,7 +159,7 @@ class TDengineCursor(object):
buffer[i].extend(block[i])
return list(map(tuple, zip(*buffer)))
def fetchall_block(self):
def fetchall(self):
if self._result is None or self._fields is None:
raise OperationalError("Invalid use of fetchall")