def fetchall(self):
result = []<EOL>iterate = True<EOL>while iterate:<EOL><INDENT>try:<EOL><INDENT>result.append(self.next())<EOL><DEDENT>except StopIteration:<EOL><INDENT>iterate = False<EOL><DEDENT><DEDENT>return result<EOL>
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.