pub struct ParsedColumn {
pub name: String,
pub datatype: String,
pub is_pk: bool,
pub not_null: bool,
pub is_unique: bool,
pub default: Option<Value>,
}Expand description
The schema for each SQL column in every table is represented by the following structure after parsed and tokenized
Fields§
§name: StringName of the column
datatype: StringDatatype of the column in String format
is_pk: boolValue representing if column is PRIMARY KEY
not_null: boolValue representing if column was declared with the NOT NULL Constraint
is_unique: boolValue representing if column was declared with the UNIQUE Constraint
default: Option<Value>Literal value to use when this column is omitted from an INSERT.
Restricted to literal expressions (integer, real, text, bool, NULL);
non-literal DEFAULT expressions are rejected at CREATE TABLE time.
Trait Implementations§
Source§impl Clone for ParsedColumn
impl Clone for ParsedColumn
Source§fn clone(&self) -> ParsedColumn
fn clone(&self) -> ParsedColumn
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ParsedColumn
impl Debug for ParsedColumn
Source§impl PartialEq for ParsedColumn
impl PartialEq for ParsedColumn
Source§fn eq(&self, other: &ParsedColumn) -> bool
fn eq(&self, other: &ParsedColumn) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ParsedColumn
Auto Trait Implementations§
impl Freeze for ParsedColumn
impl RefUnwindSafe for ParsedColumn
impl Send for ParsedColumn
impl Sync for ParsedColumn
impl Unpin for ParsedColumn
impl UnsafeUnpin for ParsedColumn
impl UnwindSafe for ParsedColumn
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