pub struct CreateView {Show 28 fields
pub name: TableRef,
pub columns: Vec<ViewColumn>,
pub query: Expression,
pub or_replace: bool,
pub if_not_exists: bool,
pub materialized: bool,
pub temporary: bool,
pub secure: bool,
pub algorithm: Option<String>,
pub definer: Option<String>,
pub security: Option<FunctionSecurity>,
pub security_sql_style: bool,
pub query_parenthesized: bool,
pub locking_mode: Option<String>,
pub locking_access: Option<String>,
pub copy_grants: bool,
pub comment: Option<String>,
pub tags: Vec<(String, String)>,
pub options: Vec<Expression>,
pub build: Option<String>,
pub refresh: Option<Box<RefreshTriggerProperty>>,
pub schema: Option<Box<Schema>>,
pub unique_key: Option<Box<UniqueKeyProperty>>,
pub no_schema_binding: bool,
pub auto_refresh: Option<bool>,
pub on_cluster: Option<OnCluster>,
pub to_table: Option<TableRef>,
pub table_properties: Vec<Expression>,
}Expand description
CREATE VIEW statement
Fields§
§name: TableRef§columns: Vec<ViewColumn>§query: Expression§or_replace: bool§if_not_exists: bool§materialized: bool§temporary: bool§secure: boolSnowflake: SECURE VIEW
algorithm: Option<String>MySQL: ALGORITHM=UNDEFINED/MERGE/TEMPTABLE
definer: Option<String>MySQL: DEFINER=user@host
security: Option<FunctionSecurity>MySQL: SQL SECURITY DEFINER/INVOKER; Presto: SECURITY DEFINER/INVOKER
security_sql_style: boolTrue for MySQL-style “SQL SECURITY”, false for Presto-style “SECURITY”
query_parenthesized: boolWhether the query was parenthesized: AS (SELECT …)
locking_mode: Option<String>Teradata: LOCKING mode (ROW, TABLE, DATABASE)
locking_access: Option<String>Teradata: LOCKING access type (ACCESS, READ, WRITE)
copy_grants: boolSnowflake: COPY GRANTS
comment: Option<String>Snowflake: COMMENT = ‘text’
Snowflake: TAG (name=‘value’, …)
options: Vec<Expression>BigQuery: OPTIONS (key=value, …)
build: Option<String>Doris: BUILD IMMEDIATE/DEFERRED for materialized views
refresh: Option<Box<RefreshTriggerProperty>>Doris: REFRESH property for materialized views
schema: Option<Box<Schema>>Doris: Schema with typed column definitions for materialized views
This is used instead of columns when the view has typed column definitions
unique_key: Option<Box<UniqueKeyProperty>>Doris: KEY (columns) for materialized views
no_schema_binding: boolRedshift: WITH NO SCHEMA BINDING
auto_refresh: Option<bool>Redshift: AUTO REFRESH YES|NO for materialized views
on_cluster: Option<OnCluster>ClickHouse: ON CLUSTER clause
to_table: Option<TableRef>ClickHouse: TO destination_table
table_properties: Vec<Expression>ClickHouse: Table properties (ENGINE, ORDER BY, SAMPLE, SETTINGS, TTL, etc.) for materialized views
Implementations§
Source§impl CreateView
impl CreateView
pub fn new(name: impl Into<String>, query: Expression) -> Self
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