MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / DropView

Class DropView

lib/sqlalchemy/sql/ddl.py:898–925  ·  view source on GitHub ↗

DROP VIEW' construct. .. versionadded:: 2.1 the :class:`.DropView` construct became public and was renamed from ``_DropView``.

Source from the content-addressed store, hash-verified

896
897
898class 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
928class CreateConstraint(BaseDDLElement):

Callers 5

__init__Method · 0.85
drop_dest_tableMethod · 0.85
test_drop_view_basicMethod · 0.85

Calls

no outgoing calls

Tested by 4

drop_dest_tableMethod · 0.68
test_drop_view_basicMethod · 0.68