Creates a table column.
@param array $column column metadata
@return CDbColumnSchema normalized column metadata
435376
protected function createColumn($column)
	{
		$c=new CMysqlColumnSchema;
		$c->name=$column['Field'];
		$c->rawName=$this->quoteColumnName($c->name);
		$c->allowNull=$column['Null']==='YES';
		$c->isPrimaryKey=strpos($column['Key'],'PRI')!==false;
		$c->isForeignKey=false;
		$c->init($column['Type'],$column['Default']);
		$c->autoIncrement=strpos(strtolower($column['Extra']),'auto_increment')!==false;
		if(isset($column['Comment']))
			$c->comment=$column['Comment'];

		return $c;
	}
407775
protected function getFieldByColumn($column)
    {
        return $this->builder->fields()->first(
            function (Field $field) use ($column) {
                if (is_array($field->column())) {
                    return in_array($column, $field->column(), true);
                }

                return $field->column() === $column;
            }
        );
    }
643458
protected function parseSchema(array $columns)
    {
        $schema = [];

        foreach ($columns as $name => $column) {
            $schema[] = [
                'name' => $column->getName(),
                'type' => $column->getType()->getName()
            ];
        }

        return $schema;
    }
875603
public function withColumns(array $columns): self
    {
        $loader = clone $this;
        $loader->columns = array_merge(
            [$loader->schema[Record::SH_PRIMARY_KEY]],
            $columns
        );

        return $loader;
    }
401639
public function orWhereMultiple(array $columns)
    {
        $instance = $this->whereStrategyInstance();

        $instance->whereStrategy()->orWhereMultiple($columns);

        return $instance;
    }
1082579
public function columns(string $column, string ...$columns)
    {
        array_unshift($columns, $column);

        foreach ($columns as $column) {
            $this->column($column);
        }

        return $this;
    }
1200334
public function setColumns(array $columns)
    {
        $this->mappingColumns = null;
        $this->columns = array_values($columns);

        return $this;
    }
882423
public function columns($column)
    {
        foreach (func_get_args() as $column) {
            $this->columns[] = $this->grammar->buildId($column);
        }

        return $this;
    }
682299
public function withRelatedIdAs(string $column)
    {
        call_user_func($this->callback, function ($idString, Table $parentTable) use ($column) {
            $mapper = call_user_func($this->mapperLoader);

            return new ManyToManyRelation(
                    $idString,
                    $this->loadIds
                            ? new ToManyRelationIdentityReference($mapper, $this->bidirectionalRelationProperty)
                            : new ToManyRelationObjectReference($mapper, $this->bidirectionalRelationProperty),
                    $this->joinTableName,
                    $parentTable->getName(),
                    $parentTable->getPrimaryKeyColumn(),
                    $this->parentIdColumn,
                    $column
            );
        });
    }
723932
public function addColumn(string $column, array $definition = []) : Table
    {
        $this->data['columns'][$column] = TableColumn::fromArray($column, $definition);
        return $this;
    }
684268
public function getCol($column = 0)
    {
        $sql = $this->toSQL();
        return $this->table->getCol($sql, $this->getParams(), $column);
    }
1093874
public function orWhereIsNot(string $column)
    {
        $instance = $this->whereStrategyInstance();

        $instance->whereStrategy()->orWhereIsNot($column);

        return $instance;
    }
1302701
public function protect($column)
	{
		if($column === false)
		{
			$this->protected = [];
		}
		else
		{
			$this->protected = array_unique(array_merge($this->protected, (array) $column));
		}

		return $this;
	}
57236
public static function adjustColumnName($column)
    {
        if (isset(self::$columnsMap[$column])) {
            $column = self::$columnsMap[$column];
        }
        return $column;
    }
10538
protected function getAlterTableAddColumnClause(Column $column)
    {
        return 'ADD ' . $this->getColumnDeclarationSQL($column->getQuotedName($this), $column->toArray());
    }
507247
public function castColumn($column)
    {
        $column = $this->connection->getQueryGrammar()->wrap($column);
        if ($this->database === 'pgsql') {
            $column = 'CAST(' . $column . ' as TEXT)';
        } elseif ($this->database === 'firebird') {
            $column = 'CAST(' . $column . ' as VARCHAR(255))';
        }

        return $column;
    }
710539
public function addColumn($column, $type)
    {
        $this->queryBuilder->addColumn($table, $column, $type);
        return $this;
    }