MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / DropTable

Class DropTable

lib/sqlalchemy/sql/ddl.py:1054–1074  ·  view source on GitHub ↗

Represent a DROP TABLE statement.

Source from the content-addressed store, hash-verified

1052
1053
1054class DropTable(TableDropDDL):
1055 """Represent a DROP TABLE statement."""
1056
1057 __visit_name__ = "drop_table"
1058
1059 def __init__(self, element: Table, if_exists: bool = False) -> None:
1060 """Create a :class:`.DropTable` construct.
1061
1062 :param element: a :class:`_schema.Table` that's the subject
1063 of the DROP.
1064 :param on: See the description for 'on' in :class:`.DDL`.
1065 :param if_exists: if True, an IF EXISTS operator will be applied to the
1066 construct.
1067
1068 .. versionadded:: 1.4.0b2
1069
1070 """
1071 super().__init__(element, if_exists=if_exists)
1072
1073 def to_metadata(self, metadata: MetaData, table: Table) -> Self:
1074 return self.__class__(table, if_exists=self.if_exists)
1075
1076
1077class CreateSequence(_CreateBase["Sequence"]):

Callers 4

visit_tableMethod · 0.85
drop_all_tablesFunction · 0.85
drop_dest_tableMethod · 0.85

Calls

no outgoing calls

Tested by 2

drop_dest_tableMethod · 0.68