1
0
mirror of synced 2025-01-31 04:21:44 +03:00

[2.0] Added support to complex PathExpression in DQL queries

This commit is contained in:
guilhermeblanco 2009-12-31 22:50:44 +00:00
parent 3928ba9dac
commit 2195894ad3
2 changed files with 0 additions and 36 deletions

View File

@ -94,13 +94,6 @@ class Parser
*/ */
private $_em; private $_em;
/**
* The Abtract Syntax Tree of processed DQL query.
*
* @var SelectStatement | UpdateStatement | DeleteStatement
*/
private $_ast;
/** /**
* The Query to parse. * The Query to parse.
* *
@ -201,16 +194,6 @@ class Parser
return $this->_em; 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. * Registers a custom function that returns strings.
* *

View File

@ -59,25 +59,6 @@ class LanguageRecognitionTest extends \Doctrine\Tests\OrmTestCase
return $parser->parse(); 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() public function testEmptyQueryString()
{ {
$this->assertInvalidDql(''); $this->assertInvalidDql('');