[2.0] Started refactoring of AST nodes to use public properties instead of getter/setter methods
This commit is contained in:
parent
3949fddcf5
commit
401235d7ca
@ -681,16 +681,16 @@ class SqlWalker implements TreeWalker
|
|||||||
public function walkAggregateExpression($aggExpression)
|
public function walkAggregateExpression($aggExpression)
|
||||||
{
|
{
|
||||||
$sql = '';
|
$sql = '';
|
||||||
$parts = $aggExpression->getPathExpression()->getParts();
|
$parts = $aggExpression->pathExpression->getParts();
|
||||||
$dqlAlias = $aggExpression->getPathExpression()->getIdentificationVariable();
|
$dqlAlias = $aggExpression->pathExpression->getIdentificationVariable();
|
||||||
$fieldName = $parts[0];
|
$fieldName = $parts[0];
|
||||||
|
|
||||||
$qComp = $this->_queryComponents[$dqlAlias];
|
$qComp = $this->_queryComponents[$dqlAlias];
|
||||||
$columnName = $qComp['metadata']->getColumnName($fieldName);
|
$columnName = $qComp['metadata']->getColumnName($fieldName);
|
||||||
|
|
||||||
$sql .= $aggExpression->getFunctionName() . '(';
|
$sql .= $aggExpression->functionName . '(';
|
||||||
|
|
||||||
if ($aggExpression->isDistinct()) $sql .= 'DISTINCT ';
|
if ($aggExpression->isDistinct) $sql .= 'DISTINCT ';
|
||||||
|
|
||||||
$sql .= $this->getSqlTableAlias($qComp['metadata']->getTableName(), $dqlAlias) . '.'
|
$sql .= $this->getSqlTableAlias($qComp['metadata']->getTableName(), $dqlAlias) . '.'
|
||||||
. $this->_conn->quoteIdentifier($columnName) . ')';
|
. $this->_conn->quoteIdentifier($columnName) . ')';
|
||||||
|
Loading…
Reference in New Issue
Block a user