Gets the SqlServer Index Definition for an Index object.

@param \Phinx\Db\Table\Index $index Index
@return string
545852
protected function getIndexSqlDefinition(Index $index, $tableName)
    {
        if (is_string($index->getName())) {
            $indexName = $index->getName();
        } else {
            $columnNames = $index->getColumns();
            $indexName = sprintf('%s_%s', $tableName, implode('_', $columnNames));
        }
        $def = sprintf(
            "CREATE %s INDEX %s ON %s (%s);",
            ($index->getType() === Index::UNIQUE ? 'UNIQUE' : ''),
            $indexName,
            $this->quoteTableName($tableName),
            '[' . implode('],[', $index->getColumns()) . ']'
        );

        return $def;
    }
720301
public function getParam($index){
        if(isset($this->params[$index])){
            return $this->params[$index];
        }else{
            return NULL;
        }
    }
526518
public function getCreateIndexSQL(Index $index, $table)
    {
        return parent::getCreateIndexSQL($index, $table) . $this->getAdvancedIndexOptionsSQL($index);
    }
110951
public function fetchColumn($index = 0): Generator
    {
        $offset = $this->getColumnIndex($index, __METHOD__.'() expects the column index to be a valid string or integer, `%s` given');
        $filter = static function (array $record) use ($offset): bool {
            return isset($record[$offset]);
        };

        $select = static function (array $record) use ($offset): string {
            return $record[$offset];
        };

        $iterator = new MapIterator(new CallbackFilterIterator($this->records, $filter), $select);
        foreach ($iterator as $offset => $value) {
            yield $offset => $value;
        }
    }
1306686
public function getQueries($index = null)
    {
        //Argument 1 must be an int string or null
        Argument::i()->test(1, 'int', 'string', 'null');
        
        //if no index
        if (is_null($index)) {
            //return all the queries
            return $this->queries;
        }
        
        //is it the first?
        if ($index == self::FIRST) {
            //index is 0 then
            $index = 0;
        //is it the last?
        } else if ($index == self::LAST) {
            //set index to the last one
            $index = count($this->queries) - 1;
        }
        
        //if we have that record
        if (isset($this->queries[$index])) {
            //return it
            return $this->queries[$index];
        }
        
        return null;
    }
622456
public function getColumnByIndex($index)
    {
        $keys = array_keys($this->columns);
        if (empty($keys[$index]) || empty($column = $this->columns[$keys[$index]])) {
            throw new \InvalidArgumentException('Table don\'t have a column index : ' . $index);
        }

        return $column;
    }
221459
public function getIndexDDL(Index $index)
    {
        return sprintf('%sINDEX %s (%s)', $index->getIsUnique() ? 'UNIQUE ' : '', $this->quoteIdentifier($index->getName()), $this->getColumnListDDL($index->getColumns()));
    }
188720
public static function IndexToContext( $index )
	{
		$result = array();
		foreach ( $index as $dimension => $members )
		{
			foreach ( $members as $memberQName => $member )
			{
				if ( is_array( $member ) )
				{
					$x = array( $memberQName => $member );
					// Remove the dimension from the member
					foreach ( $x as $key => $xml )
					{
						// $x[ $key ] =  str_replace( "</$memberQName>", "", str_replace( "<$memberQName>", "", $xml ) );
					}
					$result[] = array( 'dimension' => $dimension, 'member' => $x );
				}
				else
				{
					$result[] = array( 'dimension' => $dimension, 'member' => $member );
				}
			}
		}

		return $result;
	}
891898
protected function getColumnNameByIndex($index)
    {
        $name = (isset($this->columns[$index]) && $this->columns[$index] != '*')
            ? $this->columns[$index] : $this->getPrimaryKeyName();

        return in_array($name, $this->extraColumns, true) ? $this->getPrimaryKeyName() : $name;
    }
550361
protected function getPrefixAt($index)
    {
        $prefixes = $this->getPrefixes();
        return isset($prefixes[$index]) ? $prefixes[$index] : null;
    }
160927
protected function parseForce($index) {
        if(empty($index)) return '';
        if(is_array($index)) $index = join(",", $index);
        return sprintf(" FORCE INDEX ( %s ) ", $index);
    }
1163453
public static function indexToQuads(array $index) {
    $quads = array();
    foreach ($index as $subject => $predicates) {
      foreach ($predicates as $predicate => $objects) {
        foreach ($objects as $object) {
          $quads[] = new Quad(new IRI($subject),
            new IRI($predicate),
            ($object['type']!='literal')
              ? new IRI($object['value']) : new TypedValue($object['value'],
            (isset($object['datatype']) && $object['datatype']!='')
              ? $object['datatype'] : RdfConstants::XSD_STRING));
        }
      }
    }
    return $quads;
  }
180538
public function get(int $index): string
    {
        return $this->handle->lIndex($this->name, $index);
    }
25895
public function indexer($index = null)
    {
        if (empty($this->nodeIndexerChain)) {
            $list = [];
            foreach ($this->keys() as $existing) {
                $list[$existing] = new NodeIndexer(
                    $existing,
                    $this->client,
                    $this->db,
                    $this->entityManager,
                    $this->moduleHandler,
                    $this->eventDispatcher,
                    $this->getIndexRealname($existing),
                    $this->preventBulkUsage
                );
            }
            $this->nodeIndexerChain = new NodeIndexerChain($list);
        }

        if ($index) {
            return $this->nodeIndexerChain->getIndexer($index);
        }

        return $this->nodeIndexerChain;
    }
287820
protected function createIndex($index) {
		if($index->isPrimary())
			$res = "\n\t\$table->setPrimaryKey(\n\t\t".$this->outputPHP($index->getColumns(), 2).",\n\t\t'".$index->getName()."'\n\t);";
		elseif($index->isUnique())
			$res = "\n\t\$table->addUniqueIndex(\n\t\t".$this->outputPHP($index->getColumns(), 2).",\n\t\t'".$index->getName()."'\n\t);";
		else {
			if(count($index->getFlags()) > 0)
				$res = "\n\t\$table->addIndex(\n\t\t".$this->outputPHP($index->getColumns(), 2).",\n\t\t'".$index->getName()."',\n\t\t".$this->outputPHP($index->getFlags(), 2)."\n\t);";
			else
				$res = "\n\t\$table->addIndex(\n\t\t".$this->outputPHP($index->getColumns(), 2).",\n\t\t'".$index->getName()."'\n\t);";
		}
		
		return $res;
	}
1144428
public static function fromIndex(Db\Index $index)
    {
        return new self([
            'name' => $index->getName(),
            'columns' => $index->getColumns(),
            'type' => $index->getType()
        ]);
    }
509371
public function getIndexUrl($index)
    {
        $oParam = (int) $this->current()->query->getValue('o') + $index;
        $newQuery = new MergeQuery('o='.$oParam);

        return $newQuery($this->url);
    }