[2.0] Reverted r7392 which generates broken SQL query.
This commit is contained in:
parent
bb94f6ea7c
commit
29e5141280
@ -2129,7 +2129,7 @@ class Parser
|
|||||||
/**
|
/**
|
||||||
* ArithmeticPrimary ::= SingleValuedPathExpression | Literal | "(" SimpleArithmeticExpression ")"
|
* ArithmeticPrimary ::= SingleValuedPathExpression | Literal | "(" SimpleArithmeticExpression ")"
|
||||||
* | FunctionsReturningNumerics | AggregateExpression | FunctionsReturningStrings
|
* | FunctionsReturningNumerics | AggregateExpression | FunctionsReturningStrings
|
||||||
* | FunctionsReturningDatetime | ResultVariable
|
* | FunctionsReturningDatetime | IdentificationVariable
|
||||||
*/
|
*/
|
||||||
public function ArithmeticPrimary()
|
public function ArithmeticPrimary()
|
||||||
{
|
{
|
||||||
@ -2154,7 +2154,7 @@ class Parser
|
|||||||
return $this->SingleValuedPathExpression();
|
return $this->SingleValuedPathExpression();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->ResultVariable();
|
return $this->IdentificationVariable();
|
||||||
|
|
||||||
case Lexer::T_INPUT_PARAMETER:
|
case Lexer::T_INPUT_PARAMETER:
|
||||||
return $this->InputParameter();
|
return $this->InputParameter();
|
||||||
|
@ -1640,9 +1640,7 @@ class SqlWalker implements TreeWalker
|
|||||||
} else if ($primary instanceof AST\Node) {
|
} else if ($primary instanceof AST\Node) {
|
||||||
$sql .= $primary->dispatch($this);
|
$sql .= $primary->dispatch($this);
|
||||||
} else if (is_string($primary)) {
|
} else if (is_string($primary)) {
|
||||||
$columnName = $this->_queryComponents[$primary]['token']['value'];
|
// We need to deal with IdentificationVariable here
|
||||||
|
|
||||||
$sql .= $this->_scalarResultAliasMap[$columnName];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $sql;
|
return $sql;
|
||||||
|
Loading…
Reference in New Issue
Block a user