MCPcopy
hub / github.com/ormar-orm/ormar / __aenter__

Method __aenter__

ormar/databases/connection.py:173–176  ·  view source on GitHub ↗

Async context manager entry - connect to a database.

(self)

Source from the content-addressed store, hash-verified

171 _transaction_connection.set(conn)
172
173 async def __aenter__(self) -> "DatabaseConnection":
174 """Async context manager entry - connect to a database."""
175 await self.connect()
176 return self
177
178 async def __aexit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> None:
179 """Async context manager exit - disconnect from database."""

Callers 1

connectMethod · 0.45

Calls 1

connectMethod · 0.95

Tested by

no test coverage detected