MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / __init__

Method __init__

lib/sqlalchemy/engine/base.py:3298–3325  ·  view source on GitHub ↗
(
        self, proxied: Engine, execution_options: CoreExecuteOptionsParameter
    )

Source from the content-addressed store, hash-verified

3296 echo: log.echo_property
3297
3298 def __init__(
3299 self, proxied: Engine, execution_options: CoreExecuteOptionsParameter
3300 ):
3301 self._proxied = proxied
3302 self.url = proxied.url
3303 self.dialect = proxied.dialect
3304 self.logging_name = proxied.logging_name
3305 self.echo = proxied.echo
3306 self._compiled_cache = proxied._compiled_cache
3307 self.hide_parameters = proxied.hide_parameters
3308 log.instance_logger(self, echoflag=self.echo)
3309
3310 # note: this will propagate events that are assigned to the parent
3311 # engine after this OptionEngine is created. Since we share
3312 # the events of the parent we also disallow class-level events
3313 # to apply to the OptionEngine class directly.
3314 #
3315 # the other way this can work would be to transfer existing
3316 # events only, using:
3317 # self.dispatch._update(proxied.dispatch)
3318 #
3319 # that might be more appropriate however it would be a behavioral
3320 # change for logic that assigns events to the parent engine and
3321 # would like it to take effect for the already-created sub-engine.
3322 self.dispatch = self.dispatch._join(proxied.dispatch)
3323
3324 self._execution_options = proxied._execution_options
3325 self.update_execution_options(**execution_options)
3326
3327 def update_execution_options(self, **opt: Any) -> None:
3328 raise NotImplementedError()

Callers

nothing calls this directly

Calls 2

_joinMethod · 0.45

Tested by

no test coverage detected