MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / with_ddl_events

Method with_ddl_events

lib/sqlalchemy/sql/ddl.py:900–910  ·  view source on GitHub ↗

helper context manager that will apply appropriate DDL events to a CREATE or DROP operation.

(self, target, **kw)

Source from the content-addressed store, hash-verified

898class InvokeDropDDLBase(InvokeDDLBase):
899 @contextlib.contextmanager
900 def with_ddl_events(self, target, **kw):
901 """helper context manager that will apply appropriate DDL events
902 to a CREATE or DROP operation."""
903
904 target.dispatch.before_drop(
905 target, self.connection, _ddl_runner=self, **kw
906 )
907 yield
908 target.dispatch.after_drop(
909 target, self.connection, _ddl_runner=self, **kw
910 )
911
912
913class SchemaGenerator(InvokeCreateDDLBase):

Callers

nothing calls this directly

Calls 2

before_dropMethod · 0.80
after_dropMethod · 0.80

Tested by

no test coverage detected