src/Leevel/Database/Condition.php
protected function normalizeColumn(string $field, string $tableName): string
    {
        if (false !== strpos($field, '{') &&
            preg_match('/^{(.+?)}$/', $field, $matches)) {
            $field = $this->connect->normalizeExpression(
                $matches[1],
                $tableName
            );
        } elseif (!preg_match('/\(.*\)/', $field)) {
            if (preg_match('/(.+)\.(.+)/', $field, $matches)) {
                $currentTableName = $matches[1];
                $tmp = $matches[2];
            } else {
                $currentTableName = $tableName;
            }

            $field = $this->connect->normalizeTableOrColumn(
                "{$currentTableName}.{$field}"
            );
        }

        return $field;
    }
protected function normalizeColumn(string $field, string $tableName): string
    {
        if (false !== strpos($field, '{') &&
            preg_match('/^{(.+?)}$/', $field, $matches)) {
            $field = $this->connect->normalizeExpression(
                $matches[1],
                $tableName
            );
        } elseif (!preg_match('/\(.*\)/', $field)) {
            if (preg_match('/(.+)\.(.+)/', $field, $matches)) {
                $currentTableName = $matches[1];
                $tmp = $matches[2];
            } else {
                $currentTableName = $tableName;
            }

            $field = $this->connect->normalizeTableOrColumn(
                "{$currentTableName}.{$field}"
            );
        }

        return $field;
    }
格式化字段.

@param string $field
@param string $tableName

@return string