pub enum ColumnConstraint {
PrimaryKey {
span: Range<usize>,
},
NotNull {
span: Range<usize>,
},
Nullable {
span: Range<usize>,
},
Unique {
span: Range<usize>,
},
Default(Expression, Range<usize>),
Check(Expression, Range<usize>),
AutoIncrement {
span: Range<usize>,
},
}Expand description
Represents a constraint on a column.
Variants§
PrimaryKey
PRIMARY KEY constraint.
NotNull
NOT NULL constraint.
Nullable
NULL constraint.
Unique
UNIQUE constraint.
Default(Expression, Range<usize>)
DEFAULT constraint with an expression.
Check(Expression, Range<usize>)
CHECK constraint with an expression.
AutoIncrement
AUTOINCREMENT constraint.
Trait Implementations§
Source§impl AsDocument for ColumnConstraint
Available on crate feature oak-pretty-print only.
impl AsDocument for ColumnConstraint
Available on crate feature
oak-pretty-print only.Source§fn as_document(&self) -> Document<'_>
fn as_document(&self) -> Document<'_>
Converts this type to a document for pretty printing.
Source§impl Clone for ColumnConstraint
impl Clone for ColumnConstraint
Source§fn clone(&self) -> ColumnConstraint
fn clone(&self) -> ColumnConstraint
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ColumnConstraint
impl Debug for ColumnConstraint
Source§impl<'de> Deserialize<'de> for ColumnConstraint
impl<'de> Deserialize<'de> for ColumnConstraint
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for ColumnConstraint
impl Serialize for ColumnConstraint
Source§impl ToSource for ColumnConstraint
impl ToSource for ColumnConstraint
Source§fn to_source(&self, buffer: &mut SourceBuffer)
fn to_source(&self, buffer: &mut SourceBuffer)
Writes the source code representation of this type to the provided buffer.
Source§fn to_source_string(&self) -> String
fn to_source_string(&self) -> String
Converts this type to a source code string.
Auto Trait Implementations§
impl Freeze for ColumnConstraint
impl RefUnwindSafe for ColumnConstraint
impl Send for ColumnConstraint
impl Sync for ColumnConstraint
impl Unpin for ColumnConstraint
impl UnsafeUnpin for ColumnConstraint
impl UnwindSafe for ColumnConstraint
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
Mutably borrows from an owned value. Read more