Enum sqlite3_parser::ast::CreateTableBody
source · pub enum CreateTableBody {
ColumnsAndConstraints {
columns: IndexMap<Name, ColumnDefinition>,
constraints: Option<Vec<NamedTableConstraint>>,
options: TableOptions,
},
AsSelect(Select),
}
Expand description
CREATE TABLE
body
Variants§
ColumnsAndConstraints
columns and constraints
Fields
§
columns: IndexMap<Name, ColumnDefinition>
table column definitions
§
constraints: Option<Vec<NamedTableConstraint>>
table constraints
§
options: TableOptions
table options
AsSelect(Select)
AS
select
Implementations§
source§impl CreateTableBody
impl CreateTableBody
sourcepub fn check(&self, tbl_name: &QualifiedName) -> Result<(), ParserError>
pub fn check(&self, tbl_name: &QualifiedName) -> Result<(), ParserError>
check for extra rules
sourcepub fn has_primary_key(&self) -> bool
pub fn has_primary_key(&self) -> bool
explicit primary key constraint ?
source§impl CreateTableBody
impl CreateTableBody
sourcepub fn columns_and_constraints(
columns: IndexMap<Name, ColumnDefinition>,
constraints: Option<Vec<NamedTableConstraint>>,
options: TableOptions,
) -> Result<CreateTableBody, ParserError>
pub fn columns_and_constraints( columns: IndexMap<Name, ColumnDefinition>, constraints: Option<Vec<NamedTableConstraint>>, options: TableOptions, ) -> Result<CreateTableBody, ParserError>
Constructor
Trait Implementations§
source§impl Clone for CreateTableBody
impl Clone for CreateTableBody
source§fn clone(&self) -> CreateTableBody
fn clone(&self) -> CreateTableBody
Returns a copy 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 CreateTableBody
impl Debug for CreateTableBody
source§impl PartialEq for CreateTableBody
impl PartialEq for CreateTableBody
source§fn eq(&self, other: &CreateTableBody) -> bool
fn eq(&self, other: &CreateTableBody) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl ToTokens for CreateTableBody
impl ToTokens for CreateTableBody
impl Eq for CreateTableBody
impl StructuralPartialEq for CreateTableBody
Auto Trait Implementations§
impl Freeze for CreateTableBody
impl RefUnwindSafe for CreateTableBody
impl Send for CreateTableBody
impl Sync for CreateTableBody
impl Unpin for CreateTableBody
impl UnwindSafe for CreateTableBody
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
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)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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
Compare self to
key
and return true
if they are equal.