public function getDefinition()
    {
        $columnNames = " (`" . implode("`,`", $this->columnNames) . "`)";
        switch ($this->indexType) {
            case self::PRIMARY:
                return "PRIMARY KEY" . $columnNames;
                break;
            case self::INDEX:
                return "KEY `" . $this->indexName . "`" . $columnNames;
                break;
            case self::UNIQUE:
                return "UNIQUE `" . $this->indexName . "`" . $columnNames;
                break;
            case self::FULLTEXT:
                return "FULLTEXT KEY `" . $this->indexName . "`" . $columnNames;
                break;
        }

        return "";
    }
public function getDefinition()
    {
        $columnNames = " (`" . implode("`,`", $this->columnNames) . "`)";
        switch ($this->indexType) {
            case self::PRIMARY:
                return "PRIMARY KEY" . $columnNames;
                break;
            case self::INDEX:
                return "KEY `" . $this->indexName . "`" . $columnNames;
                break;
            case self::UNIQUE:
                return "UNIQUE `" . $this->indexName . "`" . $columnNames;
                break;
            case self::FULLTEXT:
                return "FULLTEXT KEY `" . $this->indexName . "`" . $columnNames;
                break;
        }

        return "";
    }
public function getDefinition ( ) { $ columnNames = " (`" . implode ( "`,`" , $ this -> columnNames ) . "`)" ; switch ( $ this -> indexType ) { case self :: PRIMARY : return "PRIMARY KEY" . $ columnNames ; break ; case self :: INDEX : return "KEY `" . $ this -> indexName . "`" . $ columnNames ; break ; case self :: UNIQUE : return "UNIQUE `" . $ this -> indexName . "`" . $ columnNames ; break ; case self :: FULLTEXT : return "FULLTEXT KEY `" . $ this -> indexName . "`" . $ columnNames ; break ; } return "" ; }
Returns the definition for this index.
@return string
Returns the definition for this index .