Add table index;

@param string $name

@return SQLGenerator
557389
public function addIndex($name)
    {
        if ($this->scope == 'alter') {
            $command = 'ADD INDEX';
        } else {
            $command = 'INDEX';
        }

        $this->sqls[] = sprintf('%s `%s`', $command, $name);

        return $this;
    }
723397
protected function loadTable($name)
	{
		$table=new CMssqlTableSchema;
		$this->resolveTableNames($table,$name);
		//if (!in_array($table->name, $this->tableNames)) return null;
		$table->primaryKey=$this->findPrimaryKey($table);
		$table->foreignKeys=$this->findForeignKeys($table);
		if($this->findColumns($table))
		{
			return $table;
		}
		else
			return null;
	}
1250568
public function renameIndex(array $columns, string $name): AbstractTable
    {
        if (!$this->hasIndex($columns)) {
            throw new SchemaException(
                "Undefined index ['" . join("', '", $columns) . "'] in '{$this->getName()}'"
            );
        }

        //Declaring new index name
        $this->index($columns)->setName($name);

        return $this;
    }
1127708
public function dropIndex($name)
    {
        if (!$this->hasIndex($name)) {
            return $this;
        }

        $query = MysqlGrammar::dropIndex($this->getName(), $name);

        $this->db->setQuery($query)->execute();

        return $this->reset();
    }
493261
public function addInputSearch(string $name) : Element\Input\Search
    {
        $input = new Element\Input\Search($this, $name);
        $this->addComponent($name, $input);

        return $input;
    }
1000780
public function createTable(string $name): Table {
		$newTable = new PgsqlTable($name);
		$this->database->addMetaEntity($newTable);
		return $newTable;
	}
1100593
public static function table($name)
    {
        Validate::table($name)->exists();

        $self                  = new self();
        $self->tables['local'] = $name;

        return $self;
    }
354859
public function createTable($name, $columns)
    {
        $cols = null;

        foreach ($columns as $col => $options) {
            $cols .= "\t" . $col . ' ' . implode(' ', $options) . ",\n";
        }
        $cols = substr($cols, 0, -2);

        $this->sql = "CREATE TABLE "
            . $this->prefix
            . $name
            . "\n(\n"
            . $cols
            . "\n);\n";

        if ($this->dialect == 'sqlite') {
            $this->sql = str_replace('auto_increment', '', $this->sql);
        }

        return $this;
    }
29911
public static function buildFromName(Table $table, $name)
    {
        $index = new Index();
        $index->setName($name);

        return new static($table, $index);
    }
728666
public function PushVar( $name )
	{
		$id = $this->NewReference();
		$this->_slots[] = new NameSlot( $id, $name );
		return $id;
	}
1223781
public function build($name = null)
    {
        $tables = [$name];
        if (empty($name)) {
            $tables = $this->_schema->listTables();
        }

        foreach ($tables as $table) {
            $this->_schema->describe($table, ['forceRefresh' => true]);
        }

        return $tables;
    }
390115
public static function addIndex($table, $type, $columns, $name)
    {
        $cols = static::buildIndexDeclare($name, $columns, $table);

        return static::build(
            'CREATE',
            strtoupper($type),
            $cols
        );
    }
512832
function addField( $name ) {
		$this->columns[$this->FieldID( $name )] = $name;

		// Return the field list
		return $this->columns;
	}
1081640
public function addColumn( $table, $name, $type )
    {
        return $this->handler->addColumn( $table, $name, $type );
    }
350467
protected function getIndex(string $name = null): array
    {
        return self::query($this->db->createIndex($name ? $name : $this->tableName));
    }
231462
public function getTable($name)
	{

		if (!isset($this->_tables[$name]))
            $this->_tables[$name] = $this->_createTable($name);

        return $this->_tables[$name];
	}
1119639
public function createControl(string $name): Control
  {
    $control = new TableColumnControl($name);
    $control->setTableColumn($this->tableColumn);

    return $control;
  }