Fetch many rows. When all rows are exhausted, returns an empty sequence. This method is provided for backwards compatibility with SQLAlchemy 1.x.x. To fetch rows in groups, use the :meth:`_engine.Result.partitions` method. :return: a sequence of :c
(
self, size: Optional[int] = None
)
| 945 | return row |
| 946 | |
| 947 | def fetchmany( |
| 948 | self, size: Optional[int] = None |
| 949 | ) -> Sequence[Row[Unpack[_Ts]]]: |
| 950 | """Fetch many rows. |
| 951 | |
| 952 | When all rows are exhausted, returns an empty sequence. |
| 953 | |
| 954 | This method is provided for backwards compatibility with |
| 955 | SQLAlchemy 1.x.x. |
| 956 | |
| 957 | To fetch rows in groups, use the :meth:`_engine.Result.partitions` |
| 958 | method. |
| 959 | |
| 960 | :return: a sequence of :class:`_engine.Row` objects. |
| 961 | |
| 962 | .. seealso:: |
| 963 | |
| 964 | :meth:`_engine.Result.partitions` |
| 965 | |
| 966 | """ |
| 967 | |
| 968 | return self._manyrow_getter(self, size) |
| 969 | |
| 970 | def all(self) -> Sequence[Row[Unpack[_Ts]]]: |
| 971 | """Return all rows in a sequence. |