pub struct ForeignKeySpec {
pub name: &'static str,
pub columns: &'static [&'static str],
pub foreign_table: &'static str,
pub foreign_columns: &'static [&'static str],
pub on_delete: Option<RefAction>,
pub on_update: Option<RefAction>,
}Expand description
A foreign-key constraint. The local columns reference
foreign_table(foreign_columns). Generated from
#[orm(references = "table(col)")] on a field.
This is a constraint (database-enforced referential integrity within one database), not an ORM relationship: there is no lazy/eager navigation attached to it. See the crate docs on why relationships stay explicit.
Fields§
§name: &'static str§columns: &'static [&'static str]§foreign_table: &'static str§foreign_columns: &'static [&'static str]§on_delete: Option<RefAction>§on_update: Option<RefAction>Trait Implementations§
Source§impl Clone for ForeignKeySpec
impl Clone for ForeignKeySpec
impl Copy for ForeignKeySpec
Auto Trait Implementations§
impl Freeze for ForeignKeySpec
impl RefUnwindSafe for ForeignKeySpec
impl Send for ForeignKeySpec
impl Sync for ForeignKeySpec
impl Unpin for ForeignKeySpec
impl UnsafeUnpin for ForeignKeySpec
impl UnwindSafe for ForeignKeySpec
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