MCPcopy Create free account
hub / github.com/zzzeek/sqlalchemy / _init_default

Method _init_default

lib/sqlalchemy/engine/default.py:1719–1736  ·  view source on GitHub ↗

Initialize execution context for a ColumnDefault construct.

(
        cls,
        dialect: Dialect,
        connection: Connection,
        dbapi_connection: PoolProxiedConnection,
        execution_options: _ExecuteOptions,
    )

Source from the content-addressed store, hash-verified

1717
1718 @classmethod
1719 def _init_default(
1720 cls,
1721 dialect: Dialect,
1722 connection: Connection,
1723 dbapi_connection: PoolProxiedConnection,
1724 execution_options: _ExecuteOptions,
1725 ) -> ExecutionContext:
1726 """Initialize execution context for a ColumnDefault construct."""
1727
1728 self = cls.__new__(cls)
1729 self.root_connection = connection
1730 self._dbapi_connection = dbapi_connection
1731 self.dialect = connection.dialect
1732
1733 self.execution_options = execution_options
1734
1735 self.cursor = self.create_cursor()
1736 return self
1737
1738 def _get_cache_stats(self) -> str:
1739 if self.compiled is None:

Callers

nothing calls this directly

Calls 2

create_cursorMethod · 0.95
__new__Method · 0.45

Tested by

no test coverage detected