prepareColumn

@param Column $column

@return  Column
11718
protected function prepareColumn(Column $column)
    {
        /** @var PostgresqlType $typeMapper */
        $typeMapper = $this->getDataType();

        $type = $typeMapper::getType($column->getType());

        $length = $typeMapper::noLength($type) ? null : $column->getLength();

        $column->length($length);

        if ($column->getAutoIncrement()) {
            $column->type(PostgresqlType::SERIAL);
            $options['sequences'][$column->getName()] = $this->getName() . '_' . $column->getName() . '_seq';
        }

        return parent::prepareColumn($column);
    }
1251887
public function hideColumn($column)
    {
        if (! is_array($column))
            $column = [$column];

        $newColumn = [];
        foreach ($this->column as $item) {
            if (is_array($item)) {
                $new = array_values(array_diff($item, $column));
                if (! empty($new))
                    $newColumn[] = count($new) > 1
                        ? array_values($new)
                        : $new[0];
            }
            else if (! in_array($item, $column))
                $newColumn[] = $item;

        }
        $this->column = $newColumn;

        return $this;
    }
1652
public function columns($columns)
  {
    if ( is_null($this->columns) ){
      $this->columns = new Element('()', $columns);
    }
    else {
      $this->columns->append($columns);
    }

    return $this;
  }
1345301
protected function createColumn($column)
	{
		$c=new CMssqlColumnSchema;
		$c->name=$column['COLUMN_NAME'];
		$c->rawName=$this->quoteColumnName($c->name);
		$c->allowNull=$column['IS_NULLABLE']=='YES';
		if ($column['NUMERIC_PRECISION_RADIX']!==null)
		{
			// We have a numeric datatype
			$c->size=$c->precision=$column['NUMERIC_PRECISION']!==null?(int)$column['NUMERIC_PRECISION']:null;
			$c->scale=$column['NUMERIC_SCALE']!==null?(int)$column['NUMERIC_SCALE']:null;
		}
		elseif ($column['DATA_TYPE']=='image' || $column['DATA_TYPE']=='text')
			$c->size=$c->precision=null;
		else
			$c->size=$c->precision=($column['CHARACTER_MAXIMUM_LENGTH']!== null)?(int)$column['CHARACTER_MAXIMUM_LENGTH']:null;
		$c->autoIncrement=$column['IsIdentity']==1;
		$c->comment=$column['Comment']===null ? '' : $column['Comment'];

		$c->init($column['DATA_TYPE'],$column['COLUMN_DEFAULT']);
		return $c;
	}
713532
public function expose($column)
	{
		if($column === true)
		{
			$this->protected = [];
		}
		else
		{
			$this->protected = array_diff($this->protected, (array) $column);
		}

		return $this;
	}
60388
final public function createColumnIfNotExists(Column $column): Table
    {
        if (!$this->hasColumn($column::getName())) {
            $this->createColumn($column);
        }

        return $this;
    }
1346882
public function groupBy(string $column)
    {
        $instance = $this->groupByStrategyInstance();

        $instance->groupByStrategy()->groupBy($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;
	}
684268
public function getCol($column = 0)
    {
        $sql = $this->toSQL();
        return $this->table->getCol($sql, $this->getParams(), $column);
    }
828132
public function orderDesc(string $column)
    {
        $instance = $this->orderByStrategyInstance();

        $instance->orderByStrategy()->orderDesc($column);

        return $instance;
    }
127949
public function addColumn(Column $column)
    {
        if (array_key_exists((string)$column, $this->columns)) {
            throw new \InvalidArgumentException("Column with label '$column' already exists!");
        }
        $this->columns[(string)$column] = $column;

        return $this;
    }
474991
public static function fromColumn(Db\Column $column)
    {
        $data = $column->toArray();
        if (isset($data['type']) && is_integer($data['type'])) {
            $data['type'] = self::getTypeName($data['type']);
        }
        if (isset($data['bindType']) && is_integer($data['bindType'])) {
            $data['bindType'] = self::getBindName($data['bindType']);
        }
        
        return new self($data);
    }
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;
            }
        );
    }
325899
public function using($column)
	{
		/** @var ColumnInterface $columnObj */
		$columnObj = $this->factory->references('Column', $column);
		$this->join->using($columnObj);

		return $this;
	}
615770
public function setColumns($columns)
    {
        if (is_string($columns)) {
            $columns = explode(',', $columns);
            $columns = ArrayMethods::trim($columns);
        }
        $this->_columnNames = $columns;
        return $this;
    }
399265
public function addColumn(Column $column)
    {
        $this->columns[] = $column;

        if ($column instanceof ColumnInterface) {
            $column->initialize($this);
        }

        return $this;
    }
1279135
public function columns( $column )
    {
        if( is_array($column ) ) {
            $this->columns += $column;
        } elseif( func_num_args() > 1 ) {
            $column = func_get_args();
            $this->columns += $column;
        }
        return $this;
    }