pub struct TableSchema {
pub name: &'static str,
pub columns: Vec<ColumnSchema>,
pub unique_constraints: Vec<Vec<&'static str>>,
pub indexes: Vec<Vec<&'static str>>,
}Expand description
Complete model table metadata used for DDL generation.
Fields§
§name: &'static str§columns: Vec<ColumnSchema>§unique_constraints: Vec<Vec<&'static str>>§indexes: Vec<Vec<&'static str>>Implementations§
Source§impl TableSchema
impl TableSchema
Sourcepub fn validate(&self) -> Result<(), SchemaError>
pub fn validate(&self) -> Result<(), SchemaError>
Validates identifiers, indexes, unique constraints and foreign keys.
Trait Implementations§
Source§impl Clone for TableSchema
impl Clone for TableSchema
Source§impl Debug for TableSchema
impl Debug for TableSchema
impl Eq for TableSchema
Source§impl From<&TableSchema> for TableState
impl From<&TableSchema> for TableState
Source§fn from(table: &TableSchema) -> Self
fn from(table: &TableSchema) -> Self
Converts to this type from the input type.
Source§impl PartialEq for TableSchema
impl PartialEq for TableSchema
impl StructuralPartialEq for TableSchema
Auto Trait Implementations§
impl Freeze for TableSchema
impl RefUnwindSafe for TableSchema
impl Send for TableSchema
impl Sync for TableSchema
impl Unpin for TableSchema
impl UnsafeUnpin for TableSchema
impl UnwindSafe for TableSchema
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