1
0
mirror of synced 2024-12-14 15:16:04 +03:00

[2.0] Reverted r7392 which generates broken SQL query.

This commit is contained in:
guilhermeblanco 2010-03-16 16:32:30 +00:00
parent bb94f6ea7c
commit 29e5141280
2 changed files with 3 additions and 5 deletions

View File

@ -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();

View File

@ -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;