MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / with_ddl_events

Method with_ddl_events

lib/sqlalchemy/sql/ddl.py:1287–1297  ·  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

1285class InvokeDropDDLBase(InvokeDDLBase):
1286 @contextlib.contextmanager
1287 def with_ddl_events(self, target, **kw):
1288 """helper context manager that will apply appropriate DDL events
1289 to a CREATE or DROP operation."""
1290
1291 target.dispatch.before_drop(
1292 target, self.connection, _ddl_runner=self, **kw
1293 )
1294 yield
1295 target.dispatch.after_drop(
1296 target, self.connection, _ddl_runner=self, **kw
1297 )
1298
1299
1300class CheckFirst(Flag):

Callers

nothing calls this directly

Calls 2

before_dropMethod · 0.80
after_dropMethod · 0.80

Tested by

no test coverage detected