DROP VIEW' construct. .. versionadded:: 2.1 the :class:`.DropView` construct became public and was renamed from ``_DropView``.
| 896 | |
| 897 | |
| 898 | class DropView(TableDropDDL): |
| 899 | """'DROP VIEW' construct. |
| 900 | |
| 901 | .. versionadded:: 2.1 the :class:`.DropView` construct became public |
| 902 | and was renamed from ``_DropView``. |
| 903 | |
| 904 | """ |
| 905 | |
| 906 | __visit_name__ = "drop_view" |
| 907 | |
| 908 | materialized: bool |
| 909 | """Boolean flag indicating if this is a materialized view.""" |
| 910 | |
| 911 | def __init__( |
| 912 | self, |
| 913 | element: Table, |
| 914 | *, |
| 915 | if_exists: bool = False, |
| 916 | materialized: bool = False, |
| 917 | ) -> None: |
| 918 | super().__init__(element, if_exists=if_exists) |
| 919 | self.materialized = materialized |
| 920 | |
| 921 | def to_metadata(self, metadata: MetaData, table: Table) -> Self: |
| 922 | new = self.__class__.__new__(self.__class__) |
| 923 | new.__dict__.update(self.__dict__) |
| 924 | new.element = table |
| 925 | return new |
| 926 | |
| 927 | |
| 928 | class CreateConstraint(BaseDDLElement): |
no outgoing calls