pub struct Cte {
pub alias: Identifier,
pub this: Expression,
pub columns: Vec<Identifier>,
pub materialized: Option<bool>,
pub key_expressions: Vec<Identifier>,
pub alias_first: bool,
}Expand description
Represent a single Common Table Expression definition.
A CTE has a name (alias), an optional column list, and a body query.
The materialized field maps to PostgreSQL’s MATERIALIZED /
NOT MATERIALIZED hints. ClickHouse supports an inverted syntax where
the expression comes before the alias (alias_first).
Fields§
§alias: IdentifierThe CTE name.
this: ExpressionThe CTE body (typically a SELECT, UNION, etc.).
columns: Vec<Identifier>Optional column alias list: cte_name(c1, c2) AS (...).
materialized: Option<bool>Some(true) = MATERIALIZED, Some(false) = NOT MATERIALIZED, None = unspecified.
key_expressions: Vec<Identifier>USING KEY (columns) for DuckDB recursive CTEs
alias_first: boolClickHouse supports expression-first WITH items: WITH
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Cte
impl<'de> Deserialize<'de> for Cte
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Cte
Auto Trait Implementations§
impl Freeze for Cte
impl RefUnwindSafe for Cte
impl Send for Cte
impl Sync for Cte
impl Unpin for Cte
impl UnwindSafe for Cte
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more