pub struct TableItem<'a, I> {
pub table: SchemaTable<'a>,
pub value: &'a I,
}Fields§
§table: SchemaTable<'a>§value: &'a IImplementations§
Source§impl<'a> TableItem<'a, Column>
impl<'a> TableItem<'a, Column>
pub fn db_type(&self, rn: &RenameMap, report: &mut Report) -> DbNativeType
pub fn ty(&'a self) -> SchemaType<'a>
Sourcepub fn default(&self) -> Option<&Sql>
pub fn default(&self) -> Option<&Sql>
Only returns column default, if the underlying type has default value - it needs to be handled manually. If you only want to check if default exists - use has_default.
pub fn initialize_as(&self) -> Option<&Sql>
pub fn is_pk_part(&self) -> bool
pub fn has_default(&self) -> bool
pub fn is_pk_full(&self) -> bool
Source§impl TableItem<'_, Index>
impl TableItem<'_, Index>
pub fn db_columns<'i>( &'i self, rn: &'i RenameMap, ) -> impl Iterator<Item = DbColumn> + 'i
pub fn db_columns_opclass<'i>( &'i self, rn: &'i RenameMap, ) -> impl Iterator<Item = (DbColumn, Option<OpClass>)> + 'i
pub fn db_types<'i>( &'i self, rn: &'i RenameMap, report: &'i mut Report, ) -> impl Iterator<Item = DbNativeType> + 'i
Source§impl<'s> TableItem<'s, ForeignKey>
impl<'s> TableItem<'s, ForeignKey>
pub fn source_columns(&self) -> Vec<ColumnIdent> ⓘ
pub fn target_columns(&self) -> Vec<ColumnIdent> ⓘ
pub fn target_table(&self) -> SchemaTable<'s>
pub fn source_db_columns(&self, rn: &RenameMap) -> Vec<DbColumn> ⓘ
pub fn target_db_columns(&self, rn: &RenameMap) -> Vec<DbColumn> ⓘ
pub fn db_types(&self, rn: &RenameMap, report: &mut Report) -> Vec<DbNativeType> ⓘ
pub fn cardinality(&self) -> (Cardinality, Cardinality)
Source§impl<'a, I> TableItem<'a, I>
impl<'a, I> TableItem<'a, I>
pub fn unchecked_new(table: SchemaTable<'a>, value: &'a I) -> Self
Trait Implementations§
Source§impl<T> HasDefaultDbName for TableItem<'_, T>where
T: HasDefaultDbName,
impl<T> HasDefaultDbName for TableItem<'_, T>where
T: HasDefaultDbName,
Source§impl<T> IsCompatible for TableItem<'_, T>where
T: IsCompatible,
impl<T> IsCompatible for TableItem<'_, T>where
T: IsCompatible,
Source§impl<T> IsIsomorph for TableItem<'_, T>where
T: IsIsomorph,
impl<T> IsIsomorph for TableItem<'_, T>where
T: IsIsomorph,
impl<I> Copy for TableItem<'_, I>
Auto Trait Implementations§
impl<'a, I> Freeze for TableItem<'a, I>
impl<'a, I> RefUnwindSafe for TableItem<'a, I>where
I: RefUnwindSafe,
impl<'a, I> Send for TableItem<'a, I>where
I: Sync,
impl<'a, I> Sync for TableItem<'a, I>where
I: Sync,
impl<'a, I> Unpin for TableItem<'a, I>
impl<'a, I> UnwindSafe for TableItem<'a, I>where
I: RefUnwindSafe,
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§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more