protected function getForeignKeySQLDeclaration(ForeignKey $foreignKey)
    {
        if (!$this->supportForeignKeys()) {
            throw PlatformException::methodNotSupported(__METHOD__);
        }

        return 'CONSTRAINT '.$foreignKey->getName().
               ' FOREIGN KEY'.
               ' ('.implode(', ', $foreignKey->getLocalColumnNames()).')'.
               ' REFERENCES '.$foreignKey->getForeignTableName().
               ' ('.implode(', ', $foreignKey->getForeignColumnNames()).')'.
               ' ON DELETE '.$foreignKey->getOnDelete().
               ' ON UPDATE '.$foreignKey->getOnUpdate();
    }
protected function getForeignKeySQLDeclaration(ForeignKey $foreignKey)
    {
        if (!$this->supportForeignKeys()) {
            throw PlatformException::methodNotSupported(__METHOD__);
        }

        return 'CONSTRAINT '.$foreignKey->getName().
               ' FOREIGN KEY'.
               ' ('.implode(', ', $foreignKey->getLocalColumnNames()).')'.
               ' REFERENCES '.$foreignKey->getForeignTableName().
               ' ('.implode(', ', $foreignKey->getForeignColumnNames()).')'.
               ' ON DELETE '.$foreignKey->getOnDelete().
               ' ON UPDATE '.$foreignKey->getOnUpdate();
    }
protected function getForeignKeySQLDeclaration ( ForeignKey $ foreignKey ) { if ( ! $ this -> supportForeignKeys ( ) ) { throw PlatformException :: methodNotSupported ( __METHOD__ ) ; } return 'CONSTRAINT ' . $ foreignKey -> getName ( ) . ' FOREIGN KEY' . ' (' . implode ( ', ' , $ foreignKey -> getLocalColumnNames ( ) ) . ')' . ' REFERENCES ' . $ foreignKey -> getForeignTableName ( ) . ' (' . implode ( ', ' , $ foreignKey -> getForeignColumnNames ( ) ) . ')' . ' ON DELETE ' . $ foreignKey -> getOnDelete ( ) . ' ON UPDATE ' . $ foreignKey -> getOnUpdate ( ) ; }
Gets the foreign key SQL declaration.

@param \Fridge\DBAL\Schema\ForeignKey $foreignKey The foreign key.

@throws \Fridge\DBAL\Exception\PlatformException If the platform does not support foreign key.

@return string The foreign key SQL declaration.
Gets the foreign key SQL declaration .