pub struct AddForeignKey<'a> {Show 13 fields
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 cols_r_paren: Span,
pub references_span: Span,
pub references_table: QualifiedName<'a>,
pub references_cols: Vec<Identifier<'a>>,
pub references_cols_r_paren: Option<Span>,
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
cols_r_paren: SpanSpan of “)” closing the cols list
references_span: SpanSpan of “REFERENCES”
references_table: QualifiedName<'a>Refereed table
references_cols: Vec<Identifier<'a>>Columns in referred table
references_cols_r_paren: Option<Span>Span of “)” closing the references_cols list, if specified
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§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