MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _construct

Method _construct

lib/sqlalchemy/engine/reflection.py:240–248  ·  view source on GitHub ↗
(
        cls, init: Callable[..., Any], bind: Union[Engine, Connection]
    )

Source from the content-addressed store, hash-verified

238
239 @classmethod
240 def _construct(
241 cls, init: Callable[..., Any], bind: Union[Engine, Connection]
242 ) -> Inspector:
243 if hasattr(bind.dialect, "inspector"):
244 cls = bind.dialect.inspector
245
246 self = cls.__new__(cls)
247 init(self, bind)
248 return self
249
250 def _init_legacy(self, bind: Union[Engine, Connection]) -> None:
251 if hasattr(bind, "exec_driver_sql"):

Callers 4

_inspection_contextMethod · 0.95
from_engineMethod · 0.45
_engine_inspMethod · 0.45
_connection_inspMethod · 0.45

Calls 1

__new__Method · 0.45

Tested by

no test coverage detected