MCPcopy
hub / github.com/tortoise/tortoise-orm / all

Method all

tortoise/connection.py:256–262  ·  view source on GitHub ↗

Returns a list of connection objects from the storage in the `current context`.

(self)

Source from the content-addressed store, hash-verified

254 self._storage = storage
255
256 def all(self) -> list[BaseDBAsyncClient]:
257 """Returns a list of connection objects from the storage in the `current context`."""
258 # The reason this method iterates over db_config and not over `storage` directly is
259 # because: assume that someone calls `discard` with a certain alias, and calls this
260 # method subsequently. The alias which just got discarded from the storage would not
261 # appear in the returned list though it exists as part of the `db_config`.
262 return [self.get(alias) for alias in self.db_config]
263
264 async def close_all(self, discard: bool = True) -> None:
265 """

Callers 1

close_allMethod · 0.95

Calls 1

getMethod · 0.95

Tested by

no test coverage detected