pub struct AddForeignKey<'a> {
pub add_span: Span,
pub constraint: Option<(Span, Option<Identifier<'a>>)>,
pub foreign_key_span: Span,
pub if_not_exists: Option<Span>,
pub name: Option<Identifier<'a>>,
pub cols: Vec<IndexCol<'a>>,
pub references_span: Span,
pub references_table: Identifier<'a>,
pub references_cols: Vec<Identifier<'a>>,
pub ons: Vec<ForeignKeyOn>,
pub not_valid: Option<Span>,
}Expand description
Add a foreign key
Fields§
§add_span: SpanSpan of “ADD”
constraint: Option<(Span, Option<Identifier<'a>>)>Optional “CONSTRAINT” with symbol if specified
foreign_key_span: SpanSpan of “FOREIGN KEY”
if_not_exists: Option<Span>Span of “IF NOT EXISTS” if specified
name: Option<Identifier<'a>>Named of index if specified
cols: Vec<IndexCol<'a>>Columns to add the index over
references_span: SpanSpan of “REFERENCES”
references_table: Identifier<'a>Refereed table
references_cols: Vec<Identifier<'a>>Columns in referred table
ons: Vec<ForeignKeyOn>List of what should happen at specified events
not_valid: Option<Span>Span of “NOT VALID” if specified
Trait Implementations§
Source§impl<'a> Clone for AddForeignKey<'a>
impl<'a> Clone for AddForeignKey<'a>
Source§fn clone(&self) -> AddForeignKey<'a>
fn clone(&self) -> AddForeignKey<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for AddForeignKey<'a>
impl<'a> Debug for AddForeignKey<'a>
Auto Trait Implementations§
impl<'a> Freeze for AddForeignKey<'a>
impl<'a> RefUnwindSafe for AddForeignKey<'a>
impl<'a> Send for AddForeignKey<'a>
impl<'a> Sync for AddForeignKey<'a>
impl<'a> Unpin for AddForeignKey<'a>
impl<'a> UnsafeUnpin for AddForeignKey<'a>
impl<'a> UnwindSafe for AddForeignKey<'a>
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