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

Method with_ddl_events

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

1270class InvokeCreateDDLBase(InvokeDDLBase):
1271 @contextlib.contextmanager
1272 def with_ddl_events(self, target, **kw):
1273 """helper context manager that will apply appropriate DDL events
1274 to a CREATE or DROP operation."""
1275
1276 target.dispatch.before_create(
1277 target, self.connection, _ddl_runner=self, **kw
1278 )
1279 yield
1280 target.dispatch.after_create(
1281 target, self.connection, _ddl_runner=self, **kw
1282 )
1283
1284
1285class InvokeDropDDLBase(InvokeDDLBase):

Callers

nothing calls this directly

Calls 2

before_createMethod · 0.80
after_createMethod · 0.80

Tested by

no test coverage detected