protected function getIndexSQLDeclaration(Index $index)
    {
        if (!$this->supportIndexes()) {
            throw PlatformException::methodNotSupported(__METHOD__);
        }

        if (!$index->isUnique()) {
            return 'INDEX '.$index->getName().' ('.implode(', ', $index->getColumnNames()).')';
        }

        return 'CONSTRAINT '.$index->getName().' UNIQUE ('.implode(', ', $index->getColumnNames()).')';
    }
protected function getIndexSQLDeclaration(Index $index)
    {
        if (!$this->supportIndexes()) {
            throw PlatformException::methodNotSupported(__METHOD__);
        }

        if (!$index->isUnique()) {
            return 'INDEX '.$index->getName().' ('.implode(', ', $index->getColumnNames()).')';
        }

        return 'CONSTRAINT '.$index->getName().' UNIQUE ('.implode(', ', $index->getColumnNames()).')';
    }
protected function getIndexSQLDeclaration ( Index $ index ) { if ( ! $ this -> supportIndexes ( ) ) { throw PlatformException :: methodNotSupported ( __METHOD__ ) ; } if ( ! $ index -> isUnique ( ) ) { return 'INDEX ' . $ index -> getName ( ) . ' (' . implode ( ', ' , $ index -> getColumnNames ( ) ) . ')' ; } return 'CONSTRAINT ' . $ index -> getName ( ) . ' UNIQUE (' . implode ( ', ' , $ index -> getColumnNames ( ) ) . ')' ; }
Gets the index SQL declaration.

@param \Fridge\DBAl\Schema\Index $index The index.

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

@return string The index SQL declaration.
Gets the index SQL declaration .