pub struct CopyOption {
pub name: Ident,
pub value: Option<CopyOptionValue>,
pub meta: Meta,
}Expand description
One option in a COPY option list, e.g. FORMAT csv, DELIMITER ',', a bare
HEADER, DuckDB’s ROW_GROUP_SIZE 100000, or FORCE_QUOTE (a, b).
The generic key/value escape hatch of the COPY option axis: PostgreSQL’s generic
option grammar is ColLabel copy_generic_opt_arg, so the name
admits any word (including keywords such as NULL) and the argument is optional.
This one name + optional CopyOptionValue shape is a deliberate reshape
(ADR-0011) of sqlparser-rs’s fixed per-option enums (CopyOption::Format(Ident),
ForceQuote(Vec<Ident>), …): rather than enumerate PostgreSQL’s known option
keywords as variants, every option — PostgreSQL, DuckDB, or an unknown dialect
word — rides the same generic pair, so a dialect’s format/option vocabulary
(DuckDB COPY … (FORMAT PARQUET, COMPRESSION 'zstd', PARTITION_BY (y, m))) is
carried as typed data without a per-keyword variant. The value shapes
PostgreSQL’s copy_generic_opt_arg admits are the CopyOptionValue axis.
Fields§
§name: IdentName referenced by this syntax.
value: Option<CopyOptionValue>Value supplied by this syntax.
meta: MetaSource location and node identity.
Trait Implementations§
Source§impl Clone for CopyOption
impl Clone for CopyOption
Source§fn clone(&self) -> CopyOption
fn clone(&self) -> CopyOption
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 CopyOption
impl Debug for CopyOption
Source§impl<'de> Deserialize<'de> for CopyOption
impl<'de> Deserialize<'de> for CopyOption
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 CopyOption
Source§impl Hash for CopyOption
impl Hash for CopyOption
Source§impl PartialEq for CopyOption
impl PartialEq for CopyOption
Source§impl Render for CopyOption
impl Render for CopyOption
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 CopyOption
impl Serialize for CopyOption
impl StructuralPartialEq for CopyOption
Auto Trait Implementations§
impl Freeze for CopyOption
impl RefUnwindSafe for CopyOption
impl Send for CopyOption
impl Sync for CopyOption
impl Unpin for CopyOption
impl UnsafeUnpin for CopyOption
impl UnwindSafe for CopyOption
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.