pub struct SqlColumnSnapshot {
pub name: String,
pub data_type: String,
pub nullable: Option<bool>,
pub primary_key: Option<bool>,
pub generated_id: Option<IdGeneration>,
pub foreign_key: Option<ForeignKey>,
}Expand description
Introspected column metadata used by the pure migration planner.
Fields§
§name: String§data_type: String§nullable: Option<bool>§primary_key: Option<bool>§generated_id: Option<IdGeneration>§foreign_key: Option<ForeignKey>Implementations§
Source§impl SqlColumnSnapshot
impl SqlColumnSnapshot
pub fn new(name: impl Into<String>, data_type: impl Into<String>) -> Self
pub fn nullable(self, nullable: bool) -> Self
pub fn primary_key(self, primary_key: bool) -> Self
pub fn generated_id(self, generated_id: Option<IdGeneration>) -> Self
pub fn references(self, foreign_key: ForeignKey) -> Self
Trait Implementations§
Source§impl Clone for SqlColumnSnapshot
impl Clone for SqlColumnSnapshot
Source§fn clone(&self) -> SqlColumnSnapshot
fn clone(&self) -> SqlColumnSnapshot
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 SqlColumnSnapshot
impl Debug for SqlColumnSnapshot
Source§impl<'de> Deserialize<'de> for SqlColumnSnapshot
impl<'de> Deserialize<'de> for SqlColumnSnapshot
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 SqlColumnSnapshot
Source§impl PartialEq for SqlColumnSnapshot
impl PartialEq for SqlColumnSnapshot
Source§fn eq(&self, other: &SqlColumnSnapshot) -> bool
fn eq(&self, other: &SqlColumnSnapshot) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SqlColumnSnapshot
impl Serialize for SqlColumnSnapshot
impl StructuralPartialEq for SqlColumnSnapshot
Auto Trait Implementations§
impl Freeze for SqlColumnSnapshot
impl RefUnwindSafe for SqlColumnSnapshot
impl Send for SqlColumnSnapshot
impl Sync for SqlColumnSnapshot
impl Unpin for SqlColumnSnapshot
impl UnsafeUnpin for SqlColumnSnapshot
impl UnwindSafe for SqlColumnSnapshot
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.