def fetchmany(self, size=None):
if size is None:<EOL><INDENT>size = self.arraysize<EOL><DEDENT>result = []<EOL>for _ in range(size):<EOL><INDENT>one = self.fetchone()<EOL>if one is None:<EOL><INDENT>break<EOL><DEDENT>else:<EOL><INDENT>result.append(one)<EOL><DEDENT><DEDENT>return result<EOL>
Fetch the next set of rows of a query result, returning a sequence of sequences
(e.g. a list of tuples). An empty sequence is returned when no more rows are
available. The number of rows to fetch per call is specified by the parameter.
If it is not given, the cursor's arraysize determines the number of rows to be
fetched. The method should try to fetch as many rows as indicated by the size
parameter. If this is not possible due to the specified number of rows not being
available, fewer rows may be returned. An :py:class:`~pyhive.exc.Error`
(or subclass) exception is raised if the previous call to
:py:meth:`execute` did not produce any result set or no call was issued yet.