mirror of
https://github.com/PyMySQL/mysqlclient.git
synced 2025-08-15 11:10:58 +08:00
A teensy optimization.
This commit is contained in:
@ -283,7 +283,7 @@ class CursorStoreResultMixIn:
|
||||
|
||||
def fetchall(self):
|
||||
"""Fetchs all available rows from the cursor."""
|
||||
result = self.__rows[self.__pos:]
|
||||
result = self.__pos and self.__rows[self.__pos:] or self.__rows
|
||||
self.__pos = len(self.__rows)
|
||||
return result
|
||||
|
||||
|
Reference in New Issue
Block a user