mirror of
https://github.com/sqlalchemy/sqlalchemy.git
synced 2026-05-09 02:09:53 -04:00
98361f19a8
Added support for the SQL ``CREATE VIEW`` statement via the new :class:`.CreateView` DDL class. The new class allows creating database views from SELECT statements, with support for options such as ``TEMPORARY``, ``IF NOT EXISTS``, and ``MATERIALIZED`` where supported by the target database. Views defined with :class:`.CreateView` integrate with :class:`.MetaData` for automated DDL generation and provide a :class:`.Table` object for querying. this alters the CreateTableAs commit: * adds the ability for Table to be associated with Create and Drop DDL constructs * Adds CreateView variant of CreateTableAs * Both associate themselves with Table so they take place in create_all/create/drop_all/drop Fixes: #181 Change-Id: If3e568d3d6a6ce19e3d15198c3fbbe06bd847c83