MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _drop_ddl

Function _drop_ddl

test/perf/many_table_reflection.py:133–143  ·  view source on GitHub ↗
(name, schema_name, dialect_name)

Source from the content-addressed store, hash-verified

131
132
133def _drop_ddl(name, schema_name, dialect_name):
134 if dialect_name.startswith("postgres"):
135 suffix = "CASCADE"
136 elif dialect_name.startswith("oracle"):
137 suffix = "CASCADE CONSTRAINTS PURGE"
138 else:
139 suffix = ""
140 if schema_name:
141 return sa.schema.DDL(f"DROP TABLE {schema_name}.{name} {suffix}")
142 else:
143 return sa.schema.DDL(f"DROP TABLE {name} {suffix}")
144
145
146@log

Callers 2

drop_tablesFunction · 0.85
drop_allFunction · 0.85

Calls 1

startswithMethod · 0.45

Tested by

no test coverage detected