MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _inspection_context

Method _inspection_context

lib/sqlalchemy/engine/reflection.py:342–352  ·  view source on GitHub ↗

Return an :class:`_reflection.Inspector` from this one that will run all operations on a single connection.

(self)

Source from the content-addressed store, hash-verified

340
341 @contextlib.contextmanager
342 def _inspection_context(self) -> Generator[Inspector, None, None]:
343 """Return an :class:`_reflection.Inspector`
344 from this one that will run all
345 operations on a single connection.
346
347 """
348
349 with self._operation_context() as conn:
350 sub_insp = self._construct(self.__class__._init_connection, conn)
351 sub_insp.info_cache = self.info_cache
352 yield sub_insp
353
354 @property
355 def default_schema_name(self) -> Optional[str]:

Callers 2

_autoloadMethod · 0.80
reflectMethod · 0.80

Calls 2

_operation_contextMethod · 0.95
_constructMethod · 0.95

Tested by

no test coverage detected