Build a column.

@param int  $index Current index.
@param bool $flat  If true a string is returned.

@return array|string
325600
public function buildColumn(int $index, bool $flat = false)
    {
        $classes = [];
        foreach ($this->columns as $size => $columns) {
            $column = $this->getColumnByIndex($columns, $index);

            if ($column) {
                $classes = $column->build($classes, $size);
            }
        }

        $classes = array_unique($classes);

        if ($flat) {
            return implode(' ', $classes);
        }

        return $classes;
    }
63566
public function getAddIndexDDL(Index $index)
    {
        $pattern = "
CREATE %sINDEX %s ON %s (%s);
";

        return sprintf($pattern,
            $this->getIndexType($index),
            $this->quoteIdentifier($index->getName()),
            $this->quoteIdentifier($index->getTable()->getName()),
            $this->getColumnListDDL($index->getColumns())
        );
    }
141856
public function get($index, $default = null)
    {
        $indexes = explode('.', trim($index, '.'));
        $payload = $this->raw;
        $value = $default;

        foreach ($indexes as $indexValue) {
            if (!isset($payload[$indexValue])) {
                return $default;
            }
            $value = $payload = $payload[$indexValue];
        }

        return $value;
    }
1101394
public function get(string $index) : string
    {
        if (!$this->isValid($index)) {
            throw new \InvalidArgumentException('The specified value does not exist');
        }
        return $this->map[$index];
    }
439772
public function getRow($index)
    {
        $keys = array_keys($this->rows);

        return isset($keys[$index]) ? $this->rows[$keys[$index]] : null;
    }
1356387
public function getRow($index,$force=true){
		if($index<sizeof($this->rows)){
			$result=$this->rows[$index-1];
		}else if ($force){
			$this->setNumRows($index);
			$result=$this->rows[$index-1];
		}
		return $result;
	}
1011026
public function buildRow(bool $flat = false)
    {
        $classes = $this->rowClasses;

        if ($this->align) {
            $classes[] = 'align-items-' . $this->align;
        }

        if ($this->justify) {
            $classes[] = 'justify-content-' . $this->justify;
        }

        if ($this->noGutters) {
            $classes[] = 'no-gutters';
        }

        if ($flat) {
            return implode(' ', $classes);
        }

        return $classes;
    }
692365
public function valuesList($columns, $flat = false): array
    {
        $qb = clone $this->getQueryBuilder();
        $rows = $this
            ->getConnection()
            ->query($qb->select($columns)->toSQL())
            ->fetchAll();

        if ($flat) {
            $flatArr = [];
            foreach ($rows as $item) {
                $flatArr = array_merge($flatArr, array_values($item));
            }

            return $flatArr;
        }

        return $rows;
    }
1146404
public function addIndex($index)
    {
        if ($index instanceof Index) {
            $index = $index->getName();
        }

        if (!\is_scalar($index)) {
            throw new InvalidException('Invalid param type');
        }

        $this->_indices[] = (string) $index;

        return $this;
    }
76098
function setColumn($index, $params)
	{
		if (isset($this->columns[$index])) $this->columns[$index] = array_merge($this->columns[$index], $params);
		else $this->columns[$index] = $params;
	}
1112682
public function removeColumn($index)
    {
        $this->mappingColumns = null;
        array_splice($this->columns, $index, 1);

        return $this;
    }
1168802
public function getIndexRealname($index)
    {
        if (isset($this->indexAliasMap[$index])) {
            return $this->indexAliasMap[$index];
        }

        return $index;
    }
732903
public function returnsArgument(int $index = 0): Stub
    {
        return $this->doesWith(
            function ($arguments) use ($index) {
                return $arguments->get($index);
            },
            [],
            false,
            true,
            false
        );
    }
1184905
public function buildResets(int $index): array
    {
        $resets = [];

        foreach ($this->columns as $size => $columns) {
            $column = $this->getColumnByIndex($columns, $index);

            if ($column) {
                $resets = $column->buildReset($resets, $size);
            }
        }

        return $resets;
    }
531641
public function column($index = 0)
    {
        $stmt = $this->execute();

        if ($stmt) {
            return $stmt->fetchAll(PDO::FETCH_COLUMN, $index);
        } else {
            return false;
        }
    }
1300210
public function generateRules($index)
    {
        $types = [];
        foreach ($index->columns as $column) {
            if ($column->isMva) {
                $types['safe'][] = $column->name;
                continue;
            }
            if ($column->isPrimaryKey) {
                $types['required'][] = $column->name;
                $types['unique'][] = $column->name;
            }
            switch ($column->type) {
                case Schema::TYPE_PK:
                case Schema::TYPE_INTEGER:
                case Schema::TYPE_BIGINT:
                    $types['integer'][] = $column->name;
                    break;
                case Schema::TYPE_BOOLEAN:
                    $types['boolean'][] = $column->name;
                    break;
                case Schema::TYPE_FLOAT:
                    $types['number'][] = $column->name;
                    break;
                case Schema::TYPE_TIMESTAMP:
                    $types['safe'][] = $column->name;
                    break;
                default: // strings
                    $types['string'][] = $column->name;
            }
        }
        $rules = [];
        foreach ($types as $type => $columns) {
            $rules[] = "[['" . implode("', '", $columns) . "'], '$type']";
        }

        return $rules;
    }
564050
public static function getStringBaseValue($index, $default)
    {
        if (self::hasCustom($index)) {
            return (string) self::getCustom($index);
        }

        return (string) self::get($index, $default);
    }