pub struct CreateVirtualTable {
pub if_not_exists: bool,
pub name: ObjectName,
pub module: Ident,
pub args: Option<ThinVec<ModuleArg>>,
pub meta: Meta,
}Expand description
A SQLite CREATE VIRTUAL TABLE [IF NOT EXISTS] [<schema> .] <name> USING <module> [( <arg> [, <arg>] * )] statement (SQLite-specific; gated by
StatementDdlGates::create_virtual_table).
A virtual table delegates its storage and query implementation to a module
(fts5, rtree, csv, …). The module — not SQLite’s core grammar — owns the
argument syntax: fts5 reads column names and tokenize = … options, rtree
reads dimension columns, and a bespoke module reads whatever it likes. SQLite’s
own parser therefore imposes almost no structure on the argument list — it splits
the parenthesized text on the top-level commas (parentheses nest and quoted
strings are transparent) and hands each raw slice to the module verbatim, even
tolerating empty members (USING m(a,,b)). Module resolution and any argument
validation happen at execution time, so the parse layer accepts an unknown module
and any balanced-parenthesis token soup.
Each argument is consequently modelled as an OPAQUE verbatim ModuleArg (the
interned source text of one top-level slice), never a parsed sub-grammar — imposing
column/option structure would invent constraints SQLite does not enforce.
args is None for the bare USING m form and Some (possibly
empty) for the parenthesized USING m (…) form, so the two round-trip distinctly.
The name admits at most two parts (schema.table); SQLite has no TEMP virtual
table, so no temporary modifier is modelled. Non-generic: the arguments hold no
expressions or extension nodes.
Fields§
§if_not_exists: boolWhether the if not exists form was present in the source.
name: ObjectNameName referenced by this syntax.
module: IdentThe virtual-table module name (USING <module>).
args: Option<ThinVec<ModuleArg>>Arguments in source order.
meta: MetaSource location and node identity.
Trait Implementations§
Source§impl Clone for CreateVirtualTable
impl Clone for CreateVirtualTable
Source§fn clone(&self) -> CreateVirtualTable
fn clone(&self) -> CreateVirtualTable
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CreateVirtualTable
impl Debug for CreateVirtualTable
Source§impl<'de> Deserialize<'de> for CreateVirtualTable
impl<'de> Deserialize<'de> for CreateVirtualTable
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 Eq for CreateVirtualTable
Source§impl Hash for CreateVirtualTable
impl Hash for CreateVirtualTable
Source§impl PartialEq for CreateVirtualTable
impl PartialEq for CreateVirtualTable
Source§impl Render for CreateVirtualTable
impl Render for CreateVirtualTable
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 Serialize for CreateVirtualTable
impl Serialize for CreateVirtualTable
Source§impl Spanned for CreateVirtualTable
impl Spanned for CreateVirtualTable
impl StructuralPartialEq for CreateVirtualTable
Auto Trait Implementations§
impl Freeze for CreateVirtualTable
impl RefUnwindSafe for CreateVirtualTable
impl Send for CreateVirtualTable
impl Sync for CreateVirtualTable
impl Unpin for CreateVirtualTable
impl UnsafeUnpin for CreateVirtualTable
impl UnwindSafe for CreateVirtualTable
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.