pub struct DerivedNote {
pub anonymous: bool,
pub view: bool,
pub cte: bool,
pub materialized: Option<bool>,
pub uses: u32,
pub name: Vec<u8>,
pub pinned: bool,
}Expand description
Where a derived table came from.
SQLite plans a derived table by where it came from as much as by what it
holds. A CTE written MATERIALIZED is never flattened, and a CTE used more
than once is materialized once rather than run as a co-routine for each
use. A derived table that has no name is shown as (subquery-N).
Fields§
§anonymous: boolWhether the FROM term was a subquery written with no alias.
view: boolWhether the FROM term named a view.
cte: boolWhether the FROM term named a common table expression.
materialized: Option<bool>Some(true) for MATERIALIZED, Some(false) for NOT MATERIALIZED.
uses: u32How many FROM terms of the statement name the CTE.
name: Vec<u8>The CTE’s or view’s name as written, which a CO-ROUTINE or
MATERIALIZE node shows in place of the alias.
pinned: boolWhether something outside the query reads this term’s columns by its number, so it has to stay a term rather than be flattened.
The view an INSTEAD OF UPDATE or DELETE writes through is one: the
trigger’s OLD and the new values are read from its columns after the
query has found the rows.