Skip to content

Commit

Permalink
Optimize Cursor.fetchall (#62)
Browse files Browse the repository at this point in the history
Co-authored-by: Xiang Fu <xiangfu.1024@gmail.com>
  • Loading branch information
rostan-t and xiangfu0 authored Oct 13, 2023
1 parent 4dd2063 commit 802357e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pinotdb/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,10 +524,10 @@ def fetchmany(self, size=None):
def fetchall(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.
sequence of sequences (e.g. a list of tuples).
"""
return list(self)
results, self._results = self._results, []
return results

@check_result
@check_closed
Expand Down

0 comments on commit 802357e

Please sign in to comment.