Returns the property to fetch along with its type (when specified)
@param Column | string $column
@return string
10280
protected function parseColumn($column) {
		if ($column instanceof Column) {
			$type = $column->getType();
			return empty($type) ? $column->getName() : $column->getName() . ':' . $type;
		}
		
		return $column;
	}
1341596
protected function getGenericColumn(array $column)
    {
        $typeToken = '(),';
        $databaseType = strtok($column['type'], $typeToken);

        $length = $precision = strtok($typeToken);
        $length = $precision = ($length !== false) ? (int) $length : null;

        $scale = strtok($typeToken);
        $scale = ($scale !== false) ? (int) $scale : null;

        $default = !empty($column['default']) ? $column['default'] : null;

        switch ($databaseType) {
            case 'decimal':
            case 'double':
            case 'float':
            case 'numeric':
            case 'real':
                $length = null;
                break;
            case 'bigint':
            case 'int':
            case 'integer':
            case 'mediumint':
            case 'smallint':
            case 'char':
            case 'longtext':
            case 'mediumint':
            case 'mediumtext':
            case 'string':
            case 'text':
            case 'tinytext':
            case 'varchar':
                $precision = null;
                $scale = null;
                break;
            default:
                $length = null;
                $precision = null;
                $scale = null;
                break;
        }

        return parent::getGenericColumn(
            array(
                'name'           => $column['name'],
                'type'           => $databaseType,
                'length'         => $length,
                'precision'      => $precision,
                'scale'          => $scale,
                'unsigned'       => $column['unsigned'] ? true : null,
                'fixed'          => ($databaseType === 'char') ? true : null,
                'not_null'       => $column['not_null'],
                'default'        => $default,
                'auto_increment' => $column['auto_increment'] ? true : null,
                'comment'        => !empty($column['comment']) ? $column['comment'] : null,
            )
        );
    }
172112
public function orHavingIsNull(string $column)
    {
        $instance = $this->havingStrategyInstance();

        $instance->havingStrategy()->orHavingIsNull($column);

        return $instance;
    }
288186
protected function getColumnSqlDefinition(Column $column)
    {
        $buffer = [];
        if ($column->isIdentity()) {
            $buffer[] = $column->getType() === 'biginteger' ? 'BIGSERIAL' : 'SERIAL';
        } else {
            $sqlType = $this->getSqlType($column->getType(), $column->getLimit());
            $buffer[] = \strtoupper($sqlType['name']);
            // integers cant have limits in postgres
            if (static::PHINX_TYPE_DECIMAL === $sqlType['name'] && ($column->getPrecision() || $column->getScale())) {
                $buffer[] = \sprintf(
                    '(%s, %s)',
                    $column->getPrecision() ?: $sqlType['precision'],
                    $column->getScale() ?: $sqlType['scale']
                );
            } elseif ($sqlType['name'] === 'geography') {
                // geography type must be written with geometry type and srid, like this: geography(POLYGON,4326)
                $buffer[] = \sprintf(
                    '(%s,%s)',
                    \strtoupper($sqlType['type']),
                    $sqlType['srid']
                );
            } elseif (!\in_array($sqlType['name'], ['integer', 'smallint', 'bigint'], true)) {
                if ($column->getLimit() || isset($sqlType['limit'])) {
                    $buffer[] = sprintf('(%s)', $column->getLimit() ?: $sqlType['limit']);
                }
            }

            $timeTypes = [
                'time',
                'timestamp',
            ];
            if (in_array($sqlType['name'], $timeTypes) && $column->isTimezone()) {
                $buffer[] = strtoupper('with time zone');
            }
        }

        $buffer[] = $column->isNull() ? 'NULL' : 'NOT NULL';

        if (null !== $column->getDefault()) {
            $buffer[] = $this->getDefaultValueDefinition($column->getDefault());
        }

        return implode(' ', $buffer);
    }
1164339
public ColumnType getType(int column) {
        if (column < 0 || column >= columnMetaData.size())
            throw new IllegalArgumentException(
                            "Invalid column number. " + column + "only " + columnMetaData.size() + "present.");
        return columnMetaData.get(column).getColumnType();
    }
1303748
public function prefixColumn($column)
    {
        $table_names = $this->tableNames();
        if (count(
                        array_filter($table_names, function ($value) use (&$column) {
                            return strpos($column, $value . '.') === 0;
                        })
                )) {
            // the column starts with one of the table names
            $column = $this->prefix . $column;
        }

        return $column;
    }
255112
private static function getSchemaType($column)
    {
        // primary key
        if ($column->isPrimaryKey && $column->autoIncrement) {
            if ('bigint' === $column->type) {
                return 'bigPrimaryKey()';
            }
            return 'primaryKey()';
        }

        // boolean
        if ('tinyint(1)' === $column->dbType) {
            return 'boolean()';
        }

        // smallint
        if ('smallint' === $column->type) {
            if (null === $column->size) {
                return 'smallInteger()';
            }
            return 'smallInteger';
        }

        // bigint
        if ('bigint' === $column->type) {
            if (null === $column->size) {
                return 'bigInteger()';
            }
            return 'bigInteger';
        }

        // enum
        if (null !== $column->enumValues) {
            // https://github.com/yiisoft/yii2/issues/9797
            $enumValues = array_map('addslashes', $column->enumValues);
            return "enum(['".implode('\', \'', $enumValues)."'])";
        }

        // others
        if (null === $column->size && 0 >= $column->scale) {
            return $column->type.'()';
        }
        return $column->type;
    }
694210
public function getHeaderValue($column)
    {
        $value = Lang::get($column->label);

        /**
         * @event backend.list.overrideHeaderValue
         * Overrides the column header value in a list widget.
         *
         * If a value is returned from this event, it will be used as the value for the provided column.
         * `$value` is passed by reference so modifying the variable in place is also supported. Example usage:
         *
         *     Event::listen('backend.list.overrideHeaderValue', function($listWidget, $column, &$value) {
         *         $value .= '-modified';
         *     });
         *
         * Or
         *
         *     $listWidget->bindEvent('list.overrideHeaderValue', function ($column, $value) {
         *         return 'Custom header value';
         *     });
         *
         */
        if ($response = $this->fireSystemEvent('backend.list.overrideHeaderValue', [$column, &$value])) {
            $value = $response;
        }

        return $value;
    }
467409
public function get( $columns = [ '*' ] ) {
		return $this->onceWithColumns( $columns, function () {
			return $this->connection->fetchAll( $this->toSql(), $this->getBindings() );
		} );
	}
947840
public function getColumn(string $column)
    {
        return isset($this->columnData[$column]) ? $this->columnData[$column] : null;
    }
416464
public function orHavingIs(string $column)
    {
        $instance = $this->havingStrategyInstance();

        $instance->havingStrategy()->orHavingIs($column);

        return $instance;
    }
542487
protected function _initColumn($column)
    {
        $defaults = [
            'type'  => 'string',
            'array' => false
        ];
        if (is_string($column)) {
            $column = ['type' => $column];
        } elseif (isset($column[0])) {
            $column['type'] = $column[0];
            unset($column[0]);
        }
        $column += $defaults;
        return $column + ['null' => false];
    }
645856
public function getColumnName( $column )
    {
        if ( $this->getColumnsUseTranslation() )
        {
            $column = $this->view->translate(
                $this->getColumnId( $column ),
                $this->getColumnTranslateTextDomain()
            );
        }

        return $column;
    }
1033761
public function getDefault($column)
    {
        $defaults = $this->getDefaults();
        return isset($defaults[$column]) ? $defaults[$column] : null;
    }
896533
private function getPhysicalValue($column, $type = null) {
        $mapping = $this->dao()->getMapping();
        $column  = strtolower($column);
        if (!isset($mapping['columns'][$column])) throw new RuntimeException('Not a mapped column "'.func_get_arg(0).'"');

        $property      = &$mapping['columns'][$column];
        $propertyName  =  $property['name'];
        $propertyValue =  $this->$propertyName;             // the logical or physical column value

        if ($propertyValue === null)
            return null;

        if (isset($property['assoc'])) {
            if ($propertyValue === false)
                return null;
            if (!is_object($propertyValue)) {               // a foreign-key value of a not-yet-fetched relation
                if ($type !== null) throw new RuntimeException('Unexpected parameter $type="'.$type.'" (not null) for relation [name="'.$propertyName.'", column="'.$column.'", ...] of entity "'.$mapping['class'].'"');
                return $propertyValue;
            }

            /** @var PersistableObject $object */
            $object = $propertyValue;                       // a single instance of "one-to-one"|"many-to-one" relation, no join table
            if (!isset($property['ref-column']))
                $property['ref-column'] = $object->dao()->getMapping()['identity']['column'];
            $fkColumn = $property['ref-column'];
            return $object->getPhysicalValue($fkColumn);
        }

        $columnType = $property['column-type'];

        switch ($columnType) {
            case 'bool'   :
            case 'boolean': return (bool)(int) $propertyValue;

            case 'int'    :
            case 'integer': return (int) $propertyValue;

            case 'real'   :
            case 'float'  :
            case 'double' :
            case 'decimal': return (float) $propertyValue;

            case 'text'   :
            case 'string' : return (string) $propertyValue;

            default:
                // TODO: convert custom types (e.g. Enum|DateTime) to physical values
                //if (is_class($propertyType)) {
                //    $object->$propertyName = new $propertyType($row[$column]);
                //    break;
                //}
        }
        throw new RuntimeException('Unsupported attribute "column-type"="'.$columnType.'" in property [name="'.$propertyName.'", ...] of entity "'.$mapping['class'].'"');
    }
269466
private function _select($column)
    {
        if ($column === 'all' || $column == '*') {
            $this->selectColumns = $this->quoteIdentifier(
                    self::cyrus()->getTableName()
                ).'.*';
        } else {
            if (string_has($column, 'as') || string_has($column, 'AS')) {
                return $this->selectExpr($column);
            }

            $this->selectColumns = (string) str_replace(' ', '', $this->quoteIdentifier(explode(',', $column)));
        }

        return $this;
    }
1172388
public function orWhereIsNotNull(string $column)
    {
        $instance = $this->whereStrategyInstance();

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

        return $instance;
    }