src/Schema/AbstractIndex.php
public function sqlStatement(DriverInterface $driver, bool $includeTable = true): string
    {
        $statement = [$this->type == self::UNIQUE ? 'UNIQUE INDEX' : 'INDEX'];

        $statement[] = $driver->identifier($this->name);

        if ($includeTable) {
            $statement[] = "ON {$driver->identifier($this->table)}";
        }

        //Wrapping column names
        $columns = implode(', ', array_map([$driver, 'identifier'], $this->columns));

        $statement[] = "({$columns})";

        return implode(' ', $statement);
    }
public function sqlStatement(DriverInterface $driver, bool $includeTable = true): string
    {
        $statement = [$this->type == self::UNIQUE ? 'UNIQUE INDEX' : 'INDEX'];

        $statement[] = $driver->identifier($this->name);

        if ($includeTable) {
            $statement[] = "ON {$driver->identifier($this->table)}";
        }

        //Wrapping column names
        $columns = implode(', ', array_map([$driver, 'identifier'], $this->columns));

        $statement[] = "({$columns})";

        return implode(' ', $statement);
    }
public function sqlStatement ( DriverInterface $ driver , bool $ includeTable = true ) : string { $ statement = [ $ this -> type == self :: UNIQUE ? 'UNIQUE INDEX' : 'INDEX' ] ; $ statement [ ] = $ driver -> identifier ( $ this -> name ) ; if ( $ includeTable ) { $ statement [ ] = "ON {$driver->identifier($this->table)}" ; } //Wrapping column names $ columns = implode ( ', ' , array_map ( [ $ driver , 'identifier' ] , $ this -> columns ) ) ; $ statement [ ] = "({$columns})" ; return implode ( ' ' , $ statement ) ; }
Index sql creation syntax.

@param DriverInterface $driver
@param bool            $includeTable Include table ON statement (not required for inline index creation).
@return string
Index sql creation syntax .