Execute a query and fetch all rows. :param query: SQLAlchemy query expression :return: List of Row objects
(self, query: Executable)
| 25 | self._connection = connection |
| 26 | |
| 27 | async def fetch_all(self, query: Executable) -> List[Any]: |
| 28 | """ |
| 29 | Execute a query and fetch all rows. |
| 30 | |
| 31 | :param query: SQLAlchemy query expression |
| 32 | :return: List of Row objects |
| 33 | """ |
| 34 | result: CursorResult[Any] = await self._connection.execute(query) |
| 35 | return list(result.mappings().all()) |
| 36 | |
| 37 | async def fetch_one(self, query: Executable) -> Optional[RowMapping]: |
| 38 | """ |