pub struct CreateSequence<X: Extension = NoExt> {
pub temporary: Option<TemporaryTableKind>,
pub if_not_exists: bool,
pub name: ObjectName,
pub options: ThinVec<IdentityOption<X>>,
pub meta: Meta,
}Expand description
A CREATE [TEMPORARY] SEQUENCE [IF NOT EXISTS] <name> [<option> ...] sequence-generator
statement (SQL:2003 T176; PostgreSQL and DuckDB), gated by
StatementDdlGates::create_sequence.
The trailing options are the SQL-standard sequence-generator core — START [WITH],
INCREMENT [BY], MINVALUE/NO MINVALUE, MAXVALUE/NO MAXVALUE, CYCLE/NO CYCLE —
which both engines’ parsers accept in any order, so this single node is gated
per-dialect by the one flag rather than split into parallel PostgreSQL/DuckDB nodes
(ADR-0011). They reuse IdentityOption, the identical option vocabulary the
GENERATED … AS IDENTITY column form already carries; the Cache
variant is never produced here — DuckDB’s CREATE SEQUENCE grammar rejects CACHE
(engine-measured), so admitting it would over-accept, and it is a PostgreSQL-only
extension left to a follow-up.
PostgreSQL’s extended tails (AS <type>, CACHE, OWNED BY, RESTART) and DuckDB’s
OR REPLACE SEQUENCE are deliberately unmodelled here: each is one engine’s extension,
not the shared standard core, and none is exercised by the DuckDB corpus.
Fields§
§temporary: Option<TemporaryTableKind>Optional temporary for this syntax.
if_not_exists: boolWhether the if not exists form was present in the source.
name: ObjectNameName referenced by this syntax.
options: ThinVec<IdentityOption<X>>Options supplied in source order.
meta: MetaSource location and node identity.
Trait Implementations§
Source§impl<X: Clone + Extension> Clone for CreateSequence<X>
impl<X: Clone + Extension> Clone for CreateSequence<X>
Source§fn clone(&self) -> CreateSequence<X>
fn clone(&self) -> CreateSequence<X>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'de, X> Deserialize<'de> for CreateSequence<X>where
X: Deserialize<'de> + Extension,
impl<'de, X> Deserialize<'de> for CreateSequence<X>where
X: Deserialize<'de> + Extension,
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>,
impl<X: Eq + Extension> Eq for CreateSequence<X>
Source§impl<X: Extension + Render> Render for CreateSequence<X>
impl<X: Extension + Render> Render for CreateSequence<X>
Source§fn render(&self, ctx: &RenderCtx<'_>, f: &mut Formatter<'_>) -> Result
fn render(&self, ctx: &RenderCtx<'_>, f: &mut Formatter<'_>) -> Result
Source§fn operand_binding_power(&self) -> Option<BindingPower>
fn operand_binding_power(&self) -> Option<BindingPower>
None (the default) for a self-delimiting node — an atom, call, or
constructor — that never needs parentheses. Read moreSource§impl<X> Serialize for CreateSequence<X>
impl<X> Serialize for CreateSequence<X>
Source§impl<X: Extension> Spanned for CreateSequence<X>
impl<X: Extension> Spanned for CreateSequence<X>
impl<X: PartialEq + Extension> StructuralPartialEq for CreateSequence<X>
Auto Trait Implementations§
impl<X> Freeze for CreateSequence<X>
impl<X> RefUnwindSafe for CreateSequence<X>where
X: RefUnwindSafe,
impl<X> Send for CreateSequence<X>where
X: Send,
impl<X> Sync for CreateSequence<X>where
X: Sync,
impl<X> Unpin for CreateSequence<X>where
X: Unpin,
impl<X> UnsafeUnpin for CreateSequence<X>
impl<X> UnwindSafe for CreateSequence<X>where
X: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> DynAstExt for T
impl<T> DynAstExt for T
Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&dyn Any for downcasting a node back to its concrete type.Source§fn dyn_clone(&self) -> Box<dyn DynAstExt>
fn dyn_clone(&self) -> Box<dyn DynAstExt>
Clone (whose
Self-returning signature cannot go through a vtable).Source§fn dyn_eq(&self, other: &dyn DynAstExt) -> bool
fn dyn_eq(&self, other: &dyn DynAstExt) -> bool
PartialEq (whose &Self argument cannot go through a vtable). Equal
iff other holds the same concrete type and that type deems the values
equal; differently-typed nodes are never equal.