MCPcopy Index your code
hub / github.com/ormar-orm/ormar / fetch_all

Method fetch_all

ormar/databases/query_executor.py:27–35  ·  view source on GitHub ↗

Execute a query and fetch all rows. :param query: SQLAlchemy query expression :return: List of Row objects

(self, query: Executable)

Source from the content-addressed store, hash-verified

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 """

Callers 5

valuesMethod · 0.80
_fetch_singleMethod · 0.80
getMethod · 0.80
allMethod · 0.80
load_dataMethod · 0.80

Calls 2

executeMethod · 0.80
allMethod · 0.45

Tested by

no test coverage detected