Skip to main content

ViewSequenceClauseSyntax

Struct ViewSequenceClauseSyntax 

Source
pub struct ViewSequenceClauseSyntax {
    pub create_sequence_cache: bool,
    pub materialized_view_to: bool,
    pub temporary_views: bool,
    pub recursive_views: bool,
    pub view_definition_options: bool,
}
Expand description

Dialect-owned whole-statement DDL dispatch gates accepted by the parser. Dialect-owned view/sequence clause syntax accepted after a DDL statement head.

Post-dispatch refinements on CREATE VIEW / CREATE MATERIALIZED VIEW / CREATE SEQUENCE — temporary views, recursive views, view WITH options, matview TO target, sequence CACHE — split out of StatementDdlGates so whole-statement object-kind gates stay separate from clause-level grammar. Statement-head flags (create_sequence, materialized_views, or_replace, …) remain on StatementDdlGates.

Fields§

§create_sequence_cache: bool

Accept CACHE <n> in the option list of CREATE SEQUENCE.

§materialized_view_to: bool

Accept a materialized-view storage target: CREATE MATERIALIZED VIEW name TO target AS ....

§temporary_views: bool

Accept the TEMP/TEMPORARY modifier on a plain CREATE [OR REPLACE] VIEW (PostgreSQL/SQLite/DuckDB spell session-local views). On for ANSI/PostgreSQL/SQLite/ DuckDB/Lenient. MySQL has no temporary views (only temporary tables), so it is off; a consumed TEMP/TEMPORARY prefix leading into VIEW is then the syntax error MySQL reports (engine-measured-rejected on mysql:8). Gates only the view surface — the CREATE TEMPORARY TABLE form is a separate, unaffected family.

§recursive_views: bool

Accept the RECURSIVE keyword before VIEW in CREATE [OR REPLACE] [TEMP|TEMPORARY] RECURSIVE VIEW <name> (<columns>) AS <query> (DuckDB, engine-measured on duckdb 1.5.4). On for DuckDB/Lenient only — although PostgreSQL spells the same form, it is gated to the measured dialect per the no-shadowing doctrine rather than widened to the PostgreSQL reference without a differential. Off elsewhere, where the RECURSIVE keyword is left unconsumed before the expected VIEW and surfaces as a clean parse error. The keyword sits between the TEMP/TEMPORARY prefix and VIEW, never composes with MATERIALIZED, and requires the explicit column list (the engine desugars a recursive view to WITH RECURSIVE, which names its output columns).

§view_definition_options: bool

Accept MySQL’s view definition-option surface: the [ALGORITHM = {UNDEFINED | MERGE | TEMPTABLE}] [DEFINER = <user>] [SQL SECURITY {DEFINER | INVOKER}] prefix (before the VIEW keyword) on CREATE VIEW, and the whole ALTER VIEW redefinition statement, dispatched to the AlterView node. One flag gates both because they are the one MySQL view-definition behaviour — the identical ViewOptions prefix decorates CREATE VIEW and heads ALTER VIEW, and no dialect has one without the other. On for MySQL/Lenient. Off elsewhere: the option keywords before VIEW are left unconsumed (a clean parse error), and ALTER VIEW routes only to the DuckDB alter_object_set_schema SET SCHEMA head where that flag is on. A separate behaviour from that schema-relocation gate: this is the redefinition/option surface, that is the cross-schema move.

Implementations§

Source§

impl ViewSequenceClauseSyntax

Source

pub const ANSI: Self

View/sequence clause surface for the ANSI preset.

Source§

impl ViewSequenceClauseSyntax

Source

pub const LENIENT: Self

Available on crate feature lenient only.

View/sequence clause surface for the LENIENT preset.

Source§

impl ViewSequenceClauseSyntax

Source

pub const MYSQL: Self

Available on crate feature mysql only.

View/sequence clause surface for the MYSQL preset.

Source§

impl ViewSequenceClauseSyntax

Source

pub const POSTGRES: Self

Available on crate feature postgres only.

View/sequence clause surface for the POSTGRES preset.

Source§

impl ViewSequenceClauseSyntax

Source

pub const QUILTDB: Self

Available on crate feature quiltdb only.

View/sequence clause surface for the QUILTDB preset.

Source§

impl ViewSequenceClauseSyntax

Source

pub const SQLITE: Self

Available on crate feature sqlite only.

View/sequence clause surface for the SQLITE preset.

Trait Implementations§

Source§

impl Clone for ViewSequenceClauseSyntax

Source§

fn clone(&self) -> ViewSequenceClauseSyntax

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for ViewSequenceClauseSyntax

Source§

impl Debug for ViewSequenceClauseSyntax

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for ViewSequenceClauseSyntax

Source§

impl PartialEq for ViewSequenceClauseSyntax

Source§

fn eq(&self, other: &ViewSequenceClauseSyntax) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ViewSequenceClauseSyntax

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.