pub struct SqlSchemaSnapshot { /* private fields */ }Expand description
Introspected database schema used by the pure migration planner.
Implementations§
Source§impl SqlSchemaSnapshot
impl SqlSchemaSnapshot
pub fn with_table(self, table: impl Into<String>) -> Self
pub fn with_column( self, table: impl Into<String>, column: SqlColumnSnapshot, ) -> Self
pub fn with_index( self, table: impl Into<String>, index: impl Into<String>, ) -> Self
pub fn with_unique_column( self, table: impl Into<String>, column: impl Into<String>, ) -> Self
pub fn table_exists(&self, table: &str) -> bool
pub fn column_type(&self, table: &str, column: &str) -> Option<&str>
pub fn column(&self, table: &str, column: &str) -> Option<&SqlColumnSnapshot>
pub fn index_exists(&self, table: &str, index: &str) -> bool
pub fn unique_column_exists(&self, table: &str, column: &str) -> bool
Trait Implementations§
Source§impl Clone for SqlSchemaSnapshot
impl Clone for SqlSchemaSnapshot
Source§fn clone(&self) -> SqlSchemaSnapshot
fn clone(&self) -> SqlSchemaSnapshot
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SqlSchemaSnapshot
impl Debug for SqlSchemaSnapshot
Source§impl Default for SqlSchemaSnapshot
impl Default for SqlSchemaSnapshot
Source§fn default() -> SqlSchemaSnapshot
fn default() -> SqlSchemaSnapshot
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SqlSchemaSnapshot
impl<'de> Deserialize<'de> for SqlSchemaSnapshot
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SqlSchemaSnapshot
Source§impl PartialEq for SqlSchemaSnapshot
impl PartialEq for SqlSchemaSnapshot
Source§fn eq(&self, other: &SqlSchemaSnapshot) -> bool
fn eq(&self, other: &SqlSchemaSnapshot) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SqlSchemaSnapshot
impl Serialize for SqlSchemaSnapshot
impl StructuralPartialEq for SqlSchemaSnapshot
Auto Trait Implementations§
impl Freeze for SqlSchemaSnapshot
impl RefUnwindSafe for SqlSchemaSnapshot
impl Send for SqlSchemaSnapshot
impl Sync for SqlSchemaSnapshot
impl Unpin for SqlSchemaSnapshot
impl UnsafeUnpin for SqlSchemaSnapshot
impl UnwindSafe for SqlSchemaSnapshot
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.