Represent a DROP TABLE statement.
| 1052 | |
| 1053 | |
| 1054 | class 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 | |
| 1077 | class CreateSequence(_CreateBase["Sequence"]): |
no outgoing calls