From 2195894ad3029f48c55e74bcb8bd38fb892c5157 Mon Sep 17 00:00:00 2001 From: guilhermeblanco Date: Thu, 31 Dec 2009 22:50:44 +0000 Subject: [PATCH] [2.0] Added support to complex PathExpression in DQL queries --- lib/Doctrine/ORM/Query/Parser.php | 17 ----------------- .../ORM/Query/LanguageRecognitionTest.php | 19 ------------------- 2 files changed, 36 deletions(-) diff --git a/lib/Doctrine/ORM/Query/Parser.php b/lib/Doctrine/ORM/Query/Parser.php index cd1269377..7e1fe6d45 100644 --- a/lib/Doctrine/ORM/Query/Parser.php +++ b/lib/Doctrine/ORM/Query/Parser.php @@ -94,13 +94,6 @@ class Parser */ private $_em; - /** - * The Abtract Syntax Tree of processed DQL query. - * - * @var SelectStatement | UpdateStatement | DeleteStatement - */ - private $_ast; - /** * The Query to parse. * @@ -201,16 +194,6 @@ class Parser return $this->_em; } - /** - * Gets the Abstract Syntax Tree generated by the parser. - * - * @return SelectStatement | UpdateStatement | DeleteStatement - */ - public function getAST() - { - return $this->_ast; - } - /** * Registers a custom function that returns strings. * diff --git a/tests/Doctrine/Tests/ORM/Query/LanguageRecognitionTest.php b/tests/Doctrine/Tests/ORM/Query/LanguageRecognitionTest.php index adedff266..1204e1f02 100644 --- a/tests/Doctrine/Tests/ORM/Query/LanguageRecognitionTest.php +++ b/tests/Doctrine/Tests/ORM/Query/LanguageRecognitionTest.php @@ -59,25 +59,6 @@ class LanguageRecognitionTest extends \Doctrine\Tests\OrmTestCase return $parser->parse(); } - public function parseDqlForAST($dql, $hints = array()) - { - $query = $this->_em->createQuery($dql); - $query->setHint(Query::HINT_FORCE_PARTIAL_LOAD, true); - $query->setDql($dql); - - foreach ($hints as $key => $value) { - $query->setHint($key, $value); - } - - $parser = new \Doctrine\ORM\Query\Parser($query); - // We do NOT test SQL output here. That only unnecessarily slows down the tests! - $parser->setCustomOutputTreeWalker('Doctrine\Tests\Mocks\MockTreeWalker'); - $parser->parse(); - - return $parser->getAST(); - } - - public function testEmptyQueryString() { $this->assertInvalidDql('');