singlestoredb.connection.Cursor.fetchmany

abstract Cursor.fetchmany(size: Optional[int] = None) Union[Tuple[Any, ...], Dict[str, Any], pandas.core.frame.DataFrame, List[Tuple[Any, ...]], List[Dict[str, Any]]]

Fetch size rows from the result.

If size is not specified, the arraysize attribute is used.

Examples

>>> while True:
...    out = cur.fetchmany(100)
...    if not len(out):
...        break
...    for row in out:
...        print(row)
Returns

Values of the returned rows if there are rows remaining

Return type

list of tuples