pub struct TableSnapshot {
pub name: String,
pub columns: Vec<ColumnSnapshot>,
}Expand description
A snapshot of a single table’s resolved schema.
Fields§
§name: StringTable name.
columns: Vec<ColumnSnapshot>Columns in declaration order.
Implementations§
Source§impl TableSnapshot
impl TableSnapshot
Sourcepub fn from_table_schema<T: TableSchema>(dialect: &impl RustTypeMapping) -> Self
pub fn from_table_schema<T: TableSchema>(dialect: &impl RustTypeMapping) -> Self
Builds a snapshot from a #[derive(Table)] struct, resolving
Rust types to SQL DataType via the dialect’s
RustTypeMapping.
Sourcepub fn column(&self, name: &str) -> Option<&ColumnSnapshot>
pub fn column(&self, name: &str) -> Option<&ColumnSnapshot>
Looks up a column by name.
Trait Implementations§
Source§impl Clone for TableSnapshot
impl Clone for TableSnapshot
Source§fn clone(&self) -> TableSnapshot
fn clone(&self) -> TableSnapshot
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 TableSnapshot
impl Debug for TableSnapshot
Source§impl PartialEq for TableSnapshot
impl PartialEq for TableSnapshot
impl StructuralPartialEq for TableSnapshot
Auto Trait Implementations§
impl Freeze for TableSnapshot
impl RefUnwindSafe for TableSnapshot
impl Send for TableSnapshot
impl Sync for TableSnapshot
impl Unpin for TableSnapshot
impl UnwindSafe for TableSnapshot
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