格式化字段名

@param $column
@return string
196447
protected function formatColumnName($column)
    {
        if (false === strpos($column, '.'))
        {
            $column = $this->_objectName . '.' . $column;
        }

        return $column;
    }
473090
protected function compileColumnName(string $column): string
	{
		if($this->hasJsonPath($column))
		{
			$segments = explode(static::JSON_PATH_SEPARATOR, $column);

			$column = $this->escapeColumn(array_shift($segments));

			return $this->buildJsonGet($column, $segments);
		}

		return $this->escapeColumn($column);
	}
575157
public String getColumnName(final int column) throws SQLException {
    String columnName = getColumnInformation(column).getOriginalName();
    if (returnTableAlias) {
      columnName = getColumnInformation(column).getName(); //for old mysql compatibility
    }

    if ("".equals(columnName)) {
      // odd things that are no columns, e.g count(*)
      columnName = getColumnLabel(column);
    }
    return columnName;
  }
469971
protected function addColumnAlias($column)
    {
        $tableAlias = $this->getAlias();
        if (empty($tableAlias)) {
            return $column;
        }

        if (false === strpos($column, '.') &&
            false === strpos($column, '(') &&
            false === strpos($column, 'SELECT')
        ) {
            return $tableAlias.'.'.$column;
        }

        return $column;
    }
133098
protected function getColumnSqlDefinition(Column $column)
    {
        if ($column->getType() instanceof Literal) {
            $def = (string)$column->getType();
        } else {
            $sqlType = $this->getSqlType($column->getType(), $column->getLimit());
            $def = strtoupper($sqlType['name']);
        }
        if ($column->getPrecision() && $column->getScale()) {
            $def .= '(' . $column->getPrecision() . ',' . $column->getScale() . ')';
        } elseif (isset($sqlType['limit'])) {
            $def .= '(' . $sqlType['limit'] . ')';
        }
        if (($values = $column->getValues()) && is_array($values)) {
            $def .= "('" . implode("', '", $values) . "')";
        }
        $def .= $column->getEncoding() ? ' CHARACTER SET ' . $column->getEncoding() : '';
        $def .= $column->getCollation() ? ' COLLATE ' . $column->getCollation() : '';
        $def .= (!$column->isSigned() && isset($this->signedColumnTypes[$column->getType()])) ? ' unsigned' : '';
        $def .= ($column->isNull() == false) ? ' NOT NULL' : ' NULL';
        $def .= $column->isIdentity() ? ' AUTO_INCREMENT' : '';
        $def .= $this->getDefaultValueDefinition($column->getDefault(), $column->getType());

        if ($column->getComment()) {
            $def .= ' COMMENT ' . $this->getConnection()->quote($column->getComment());
        }

        if ($column->getUpdate()) {
            $def .= ' ON UPDATE ' . $column->getUpdate();
        }

        return $def;
    }
37358
public function renderColumnLabel(Column $column): string
    {
        $label = $column->getLabel();
        if (!$label) {
            $key = "datagrid.{$column->getDataGrid()->getCode()}.{$column->getCode()}";
            if ($this->translator instanceof TranslatorBagInterface
                && $this->translator->getCatalogue()
                && $this->translator->getCatalogue()->has($key)
            ) {
                $label = $key;
            } else {
                $label = ucfirst(
                    strtolower(trim(preg_replace(['/([A-Z])/', '/[_\s]+/'], ['_$1', ' '], $column->getCode())))
                );
            }
        }

        return $this->translator->trans($label);
    }
1125473
public function addTablePrefixToColumn(string $column): string
    {
        return ($this->tablePrefixer ?? $this->database->getTablePrefixer())->addTablePrefixToColumn($column);
    }
934332
public function column(string $column = null): self
    {
        if (! is_null($column)) {
            $this->column = $column;
        }

        if ($this->locale && ! is_null($column)) {
            $locale = '.'.app()->getLocale().'.';
            $this->column = preg_replace('/'.preg_quote('.', '/').'/', $locale, $column);
        }

        return $this;
    }
57236
public static function adjustColumnName($column)
    {
        if (isset(self::$columnsMap[$column])) {
            $column = self::$columnsMap[$column];
        }
        return $column;
    }
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;
            }
        );
    }
940546
public function getValue(string $column)
    {
        if ($column === 'id') return $this->id;
        return $this->data[$column]->getValue();
    }
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 '';
    }
1320960
public function columns($column = null)
	{
		if($column !== null)
		{
			$this->select([$column]);
		}

		$query = $this->compiler->select();

		return $this->connection->columns($query['sql'], $query['params']);
	}
946361
public function orderAsc(string $column)
    {
        $instance = $this->orderByStrategyInstance();

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

        return $instance;
    }
898617
public function generateColumnFormat($column)
    {
        if ($column->phpType === 'boolean') {
            return 'boolean';
        } elseif ($column->type === 'text') {
            return 'ntext';
        } elseif (stripos($column->name, 'time') !== false && $column->phpType === 'integer') {
            return 'datetime';
        } elseif (stripos($column->name, 'email') !== false) {
            return 'email';
        } elseif (stripos($column->name, 'url') !== false) {
            return 'url';
        } else {
            return 'text';
        }
    }
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();
    }
838667
public function getColumnAlignment($column)
    {
        return isset($this->columnAlignments[$column])
            ? $this->columnAlignments[$column]
            : $this->defaultColumnAlignment;
    }