public function ForeignKey(QueryBuilder $QueryBuilder, Table $Table, Traits\ForeignKey $Trait)
{
$ColumnNameMap = $Trait->GetParentReferencedColumnNameMap();
$PrimaryColumns = array_keys($ColumnNameMap);
$ForeignColumns = array_values($ColumnNameMap);
$QueryBuilder->AppendIdentifier('CONSTRAINT # ', [$Trait->GetName()]);
$QueryBuilder->AppendIdentifiers('FOREIGN KEY (#) ', $PrimaryColumns, ',');
$QueryBuilder->AppendIdentifier('REFERENCES # ', [$Trait->GetReferencedTable()->GetName()]);
$QueryBuilder->AppendIdentifiers('(#) ', $ForeignColumns, ',');
$QueryBuilder->Append('ON UPDATE ' . $this->MapForeignKeyMode($Trait->GetUpdateMode()) . ' ');
$QueryBuilder->Append('ON DELETE ' . $this->MapForeignKeyMode($Trait->GetDeleteMode()) . ' ');
}