singlestoredb.connection.Cursor.fetchmany

abstract Cursor.fetchmany(size: int | None = None) Tuple[Any, ...] | Dict[str, Any] | np.ndarray | pd.DataFrame | pl.DataFrame | pa.Table | 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