pub struct CreateView {Show 16 fields
pub or_alter: bool,
pub or_replace: bool,
pub materialized: bool,
pub secure: bool,
pub name: ObjectName,
pub name_before_not_exists: bool,
pub columns: Vec<ViewColumnDef>,
pub query: Box<Query>,
pub options: CreateTableOptions,
pub cluster_by: Vec<Ident>,
pub comment: Option<String>,
pub with_no_schema_binding: bool,
pub if_not_exists: bool,
pub temporary: bool,
pub to: Option<ObjectName>,
pub params: Option<CreateViewParams>,
}Expand description
CREATE VIEW statement.
Fields§
§or_alter: boolTrue if this is a CREATE OR ALTER VIEW statement
or_replace: bool§materialized: bool§secure: boolSnowflake: SECURE view modifier https://docs.snowflake.com/en/sql-reference/sql/create-view#syntax
name: ObjectNameView name
name_before_not_exists: boolIf if_not_exists is true, this flag is set to true if the view name comes before the IF NOT EXISTS clause.
Example:
CREATE VIEW myview IF NOT EXISTS AS SELECT 1`Otherwise, the flag is set to false if the view name comes after the clause Example:
CREATE VIEW IF NOT EXISTS myview AS SELECT 1`columns: Vec<ViewColumnDef>§query: Box<Query>§options: CreateTableOptions§cluster_by: Vec<Ident>§comment: Option<String>Snowflake: Views can have comments in Snowflake. https://docs.snowflake.com/en/sql-reference/sql/create-view#syntax
with_no_schema_binding: boolif true, has RedShift [WITH NO SCHEMA BINDING] clause https://docs.aws.amazon.com/redshift/latest/dg/r_CREATE_VIEW.html
if_not_exists: boolif true, has SQLite IF NOT EXISTS clause https://www.sqlite.org/lang_createview.html
temporary: boolif true, has SQLite TEMP or TEMPORARY clause https://www.sqlite.org/lang_createview.html
to: Option<ObjectName>if not None, has Clickhouse TO clause, specify the table into which to insert results
https://clickhouse.com/docs/en/sql-reference/statements/create/view#materialized-view
params: Option<CreateViewParams>MySQL: Optional parameters for the view algorithm, definer, and security context
Trait Implementations§
Source§impl Clone for CreateView
impl Clone for CreateView
Source§fn clone(&self) -> CreateView
fn clone(&self) -> CreateView
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more