pub struct TableDef {
pub name: String,
pub columns: Vec<ColumnDef>,
pub without_rowid: bool,
pub strict: bool,
}Expand description
A table definition in the schema.
Fields§
§name: StringTable name.
columns: Vec<ColumnDef>Column definitions in declaration order.
without_rowid: boolWhether this is a WITHOUT ROWID table.
strict: boolWhether this is a STRICT table.
Implementations§
Source§impl TableDef
impl TableDef
Sourcepub fn find_column(&self, name: &str) -> Option<&ColumnDef>
pub fn find_column(&self, name: &str) -> Option<&ColumnDef>
Find a column by name (case-insensitive).
Sourcepub fn has_column(&self, name: &str) -> bool
pub fn has_column(&self, name: &str) -> bool
Check if this table has a column with the given name (case-insensitive).
Sourcepub fn is_rowid_alias(&self, name: &str) -> bool
pub fn is_rowid_alias(&self, name: &str) -> bool
Check if a name is a rowid alias for this table.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TableDef
impl RefUnwindSafe for TableDef
impl Send for TableDef
impl Sync for TableDef
impl Unpin for TableDef
impl UnsafeUnpin for TableDef
impl UnwindSafe for TableDef
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