MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / visit_drop_index

Method visit_drop_index

lib/sqlalchemy/sql/compiler.py:7261–7272  ·  view source on GitHub ↗
(self, drop, **kw)

Source from the content-addressed store, hash-verified

7259 return text
7260
7261 def visit_drop_index(self, drop, **kw):
7262 index = drop.element
7263
7264 if index.name is None:
7265 raise exc.CompileError(
7266 "DROP INDEX requires that the index have a name"
7267 )
7268 text = "\nDROP INDEX "
7269 if drop.if_exists:
7270 text += "IF EXISTS "
7271
7272 return text + self._prepared_index_name(index, include_schema=True)
7273
7274 def _prepared_index_name(
7275 self, index: Index, include_schema: bool = False

Callers

nothing calls this directly

Calls 1

_prepared_index_nameMethod · 0.95

Tested by

no test coverage detected