@param \Doctrine\DBAL\Schema\Column $column

@return string
492571
private static function generateDecimalInput($column)
    {
        $fieldInput = $column->getName().':decimal,'.$column->getPrecision().','.$column->getScale();

        return $fieldInput;
    }
840373
public function escapeColumn(string $column): string
	{
		$segments = [];

		foreach(explode('.', $column) as $segment)
		{
			if($segment === '*')
			{
				$segments[] = $segment;
			}
			else
			{
				$segments[] = $this->escapeIdentifier($segment);
			}
		}

		return implode('.', $segments);
	}
1239951
private function columnToArray(Column $column)
    {
        return array_filter([
            'columnName' => $column->name,
            'length' => $column->length,
            'nullable' => $column->nullable,
            'unique' => $column->unique,
            'options' => $column->options,
            'precision' => $column->precision,
            'scale' => $column->scale,
            'columnDefinition' => $column->columnDefinition,
        ]);
    }
171070
private function prepareColumn(array $column)
    {
        if ($column['sql'] instanceof self) {
            [$sql, $params] = $column['sql']->toSql();

            $column['sql'] = '(' . $sql . ')';

            $column['params'] = $params;
        }

        return $column;
    }
304041
public function getFormatter(Column $column)
    {
        $decimalDigits = $column->getDecimalDigits();

        return function (Model $model, $value) use ($decimalDigits) {
            return number_format($value, $decimalDigits);
        };
    }
298368
protected function formatName($column)
    {
        if (is_string($column)) {
            $name = explode('.', $column);

            if (1 === count($name)) {
                return $name[0];
            }

            $html = array_shift($name);
            foreach ($name as $piece) {
                $html .= "[$piece]";
            }

            return $html;
        }

        if (is_array($this->column)) {
            $names = [];
            foreach ($this->column as $key => $name) {
                $names[$key] = $this->formatName($name);
            }

            return $names;
        }

        return '';
    }
947594
protected function appendTableName($column)
    {
        // If missing prepend the table name
        if (strpos($column, '.') === false) {
            return $this->modelInstance->getTable() . '.' . $column;
        }

        // Remove alias prefix indicator
        if (substr($column, 0, 2) === '_.') {
            return preg_replace('/^_\./', '', $column);
        }

        return $column;
    }
1152883
protected function column(Column $column) : ColumnExpr
    {
        return Expr::column($this->relatedTable->getName(), $column);
    }
375332
public function qualifyColumn($column)
    {
        if (Str::contains($column, '.')) {
            return $column;
        }

        $table = $this->getTable();

        if (Str::contains($table, ' as ')) {
            $table = explode(' as ', $table)[1];
        }

        return $table.'.'.$column;
    }
322376
public function getLocation($column)
    {
        $model = self::select(DB::Raw('ST_AsText('.$column.') AS '.$column))
            ->where('id', $this->id)
            ->first();

        return isset($model) ? $model->$column : '';
    }
1084300
public function renderColumnLabel(Column $column): string
    {
        // If already defined in translations, ignore
        $key = "datagrid.{$column->getDataGrid()->getCode()}.{$column->getCode()}"; // Same as base logic
        if ($this->translator instanceof TranslatorBagInterface && $this->translator->getCatalogue()->has($key)) {
            return $this->baseRenderer->renderColumnLabel($column);
        }

        $queryHandler = $column->getDataGrid()->getQueryHandler();
        // EAVFilterBundle might not be installed
        /** @noinspection ClassConstantCanBeUsedInspection */
        if (!is_a($queryHandler, 'Sidus\EAVFilterBundle\Query\Handler\EAVQueryHandlerInterface')) {
            return $this->baseRenderer->renderColumnLabel($column);
        }

        /** @var \Sidus\EAVFilterBundle\Query\Handler\EAVQueryHandlerInterface $queryHandler */
        $family = $queryHandler->getFamily();
        if (!$family->hasAttribute($column->getCode())) {
            return $this->baseRenderer->renderColumnLabel($column);
        }

        return $family->getAttribute($column->getCode())->getLabel();
    }
390525
protected function getDataColumn($column) {
		if (function_exists('array_column')) {
			return array_column($this->_data, $column);
		}
		
		$columnData = [];
		
		foreach ($this->_data as $row) {
			$columnData[] = $row[$column];
		}
		
		return $columnData;
	}
226712
protected function _getTextColumn(Column\Text $column)
    {
        $size = (string) $column->getSize();
        $type = 'VARCHAR('. static::$_textSizeInBytes[$size]. ')';

        return sprintf(
            '%s %s%s',
            $column->getName(),
            $type,
            $this->_nullableColumn($column)
        );
    }
1166836
public static function sanitize(string $column): string
    {
        if (! preg_match(self::VALID_COLUMN_NAME_REGEX, $column)) {
            abort(Response::HTTP_BAD_REQUEST);
        }

        return $column;
    }
267590
private function formatColumn($column)
    {
        $column = trim($column);
        /*调用系统函数时不处理*/
        if (strpos($column, '(') !== false) {
            return $column;
        }
        if (strpos($column, '.') !== false) {
            list($table, $column) = explode('.', $column);
            $table = '`' . $table . '`.';
        } else {
            $table = '';
        }
        if ($column == '*') {
            return $table . $column;
        }
        if (strpos($column, ' ') === false) {
            return $table . '`' . $column . '`';
        }
        $column = preg_replace('/[ ]+/', ' ', $column);
        $columns = explode(' ', $column);
        if (count($columns) == 3) {
            list($column, $as, $alias) = $columns;
        } else {
            list($column, $alias) = $columns;
        }
        return $table . '`' . $column . '` as `' . $alias . '`';
    }
1314924
private function applyTableAlias($column)
    {
        if ($this->meta->isTableColumn($column) && !$this->hasTableAlias($column)) {
            $column = $this->tableAlias . '.' . $column;
        }

        return $column;
    }
756952
public function datetimeOrNow($column = 'date')
    {
        $date = $this->entity->$column ?: Carbon::now();

        return $date->format('Y-m-d\TH:i');
    }