Struct datafusion::logical_expr::sqlparser::ast::ColumnOptionDef
source · pub struct ColumnOptionDef {
pub name: Option<Ident>,
pub option: ColumnOption,
}
Expand description
An optionally-named ColumnOption
: [ CONSTRAINT <name> ] <column-option>
.
Note that implementations are substantially more permissive than the ANSI
specification on what order column options can be presented in, and whether
they are allowed to be named. The specification distinguishes between
constraints (NOT NULL, UNIQUE, PRIMARY KEY, and CHECK), which can be named
and can appear in any order, and other options (DEFAULT, GENERATED), which
cannot be named and must appear in a fixed order. PostgreSQL
, however,
allows preceding any option with CONSTRAINT <name>
, even those that are
not really constraints, like NULL and DEFAULT. MSSQL is less permissive,
allowing DEFAULT, UNIQUE, PRIMARY KEY and CHECK to be named, but not NULL or
NOT NULL constraints (the last of which is in violation of the spec).
For maximum flexibility, we don’t distinguish between constraint and non-constraint options, lumping them all together under the umbrella of “column options,” and we allow any column option to be named.
Fields§
§name: Option<Ident>
§option: ColumnOption
Trait Implementations§
source§impl Clone for ColumnOptionDef
impl Clone for ColumnOptionDef
source§fn clone(&self) -> ColumnOptionDef
fn clone(&self) -> ColumnOptionDef
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ColumnOptionDef
impl Debug for ColumnOptionDef
source§impl Display for ColumnOptionDef
impl Display for ColumnOptionDef
source§impl Hash for ColumnOptionDef
impl Hash for ColumnOptionDef
source§impl Ord for ColumnOptionDef
impl Ord for ColumnOptionDef
source§fn cmp(&self, other: &ColumnOptionDef) -> Ordering
fn cmp(&self, other: &ColumnOptionDef) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for ColumnOptionDef
impl PartialEq for ColumnOptionDef
source§impl PartialOrd for ColumnOptionDef
impl PartialOrd for ColumnOptionDef
source§impl Visit for ColumnOptionDef
impl Visit for ColumnOptionDef
source§impl VisitMut for ColumnOptionDef
impl VisitMut for ColumnOptionDef
fn visit<V>(&mut self, visitor: &mut V) -> ControlFlow<<V as VisitorMut>::Break>where
V: VisitorMut,
impl Eq for ColumnOptionDef
impl StructuralPartialEq for ColumnOptionDef
Auto Trait Implementations§
impl Freeze for ColumnOptionDef
impl RefUnwindSafe for ColumnOptionDef
impl Send for ColumnOptionDef
impl Sync for ColumnOptionDef
impl Unpin for ColumnOptionDef
impl UnwindSafe for ColumnOptionDef
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,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more