1
0
mirror of synced 2024-12-05 03:06:05 +03:00

#1353 #1347 #1351 - Removing double quotes (confusing)

This commit is contained in:
Marco Pivetta 2015-03-31 21:50:08 +01:00
parent 5c93e61686
commit 6c5dbd8d4c

View File

@ -131,7 +131,7 @@ class LimitSubqueryOutputWalker extends SqlWalker
|| $this->platform instanceof OraclePlatform
|| $this->platform instanceof SQLAnywherePlatform
|| $this->platform instanceof DB2Platform
|| (method_exists($this->platform, "supportsRowNumberFunction")
|| (method_exists($this->platform, 'supportsRowNumberFunction')
&& $this->platform->supportsRowNumberFunction());
}
@ -156,9 +156,9 @@ class LimitSubqueryOutputWalker extends SqlWalker
$orderByItem->expression = $selectAliasToExpressionMap[$orderByItem->expression];
}
}
$func = new RowNumberOverFunction("dctrn_rownum");
$func = new RowNumberOverFunction('dctrn_rownum');
$func->orderByClause = $AST->orderByClause;
$AST->selectClause->selectExpressions[] = new SelectExpression($func, "dctrn_rownum", true);
$AST->selectClause->selectExpressions[] = new SelectExpression($func, 'dctrn_rownum', true);
// No need for an order by clause, we'll order by rownum in the outer query.
$AST->orderByClause = null;
@ -194,7 +194,7 @@ class LimitSubqueryOutputWalker extends SqlWalker
public function walkSelectStatementWithRowNumber(SelectStatement $AST)
{
$hasOrderBy = false;
$outerOrderBy = " ORDER BY dctrn_minrownum ASC";
$outerOrderBy = ' ORDER BY dctrn_minrownum ASC';
$orderGroupBy = '';
if ($AST->orderByClause instanceof OrderByClause) {
$hasOrderBy = true;
@ -206,8 +206,8 @@ class LimitSubqueryOutputWalker extends SqlWalker
$sqlIdentifier = $this->getSQLIdentifier($AST);
if ($hasOrderBy) {
$orderGroupBy = " GROUP BY " . implode(', ', $sqlIdentifier);
$sqlIdentifier[] = "MIN(" . $this->walkResultVariable("dctrn_rownum") . ") AS dctrn_minrownum";
$orderGroupBy = ' GROUP BY ' . implode(', ', $sqlIdentifier);
$sqlIdentifier[] = 'MIN(' . $this->walkResultVariable('dctrn_rownum') . ') AS dctrn_minrownum';
}
// Build the counter query
@ -511,7 +511,7 @@ class LimitSubqueryOutputWalker extends SqlWalker
// Get the root entity and alias from the AST fromClause.
$from = $AST->fromClause->identificationVariableDeclarations;
if (count($from) !== 1) {
throw new \RuntimeException("Cannot count query which selects two FROM components, cannot make distinction");
throw new \RuntimeException('Cannot count query which selects two FROM components, cannot make distinction');
}
$fromRoot = reset($from);