pub struct ForeignKey {
pub table: ObjectPath,
pub fields: Vec<String>,
pub ref_table: ObjectPath,
pub ref_fields: Vec<String>,
pub on_delete: FKOn,
pub on_update: FKOn,
}Expand description
ForeignKey generator
Fields§
§table: ObjectPath§fields: Vec<String>§ref_table: ObjectPath§ref_fields: Vec<String>§on_delete: FKOn§on_update: FKOnTrait Implementations§
Source§impl DBObject for ForeignKey
impl DBObject for ForeignKey
fn to_sql(&self, type_writer: &dyn TypeWriter) -> String
fn is_top_level(&self) -> bool
fn top_level_to_sql( &self, _type_writer: &dyn TypeWriter, _delayed: &Vec<&Box<&dyn DBObject>>, ) -> String
Source§impl Debug for ForeignKey
impl Debug for ForeignKey
Source§impl<'de> Deserialize<'de> for ForeignKey
impl<'de> Deserialize<'de> for ForeignKey
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
Auto Trait Implementations§
impl Freeze for ForeignKey
impl RefUnwindSafe for ForeignKey
impl Send for ForeignKey
impl Sync for ForeignKey
impl Unpin for ForeignKey
impl UnwindSafe for ForeignKey
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