Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
b3d110ba
Commit
b3d110ba
authored
Jul 21, 2009
by
guilhermeblanco
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[2.0] Started massive reorganization of grammar rules in DQL parser.
parent
a3018340
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
440 additions
and
435 deletions
+440
-435
Parser.php
lib/Doctrine/ORM/Query/Parser.php
+434
-423
LanguageRecognitionTest.php
tests/Doctrine/Tests/ORM/Query/LanguageRecognitionTest.php
+6
-12
No files found.
lib/Doctrine/ORM/Query/Parser.php
View file @
b3d110ba
This diff is collapsed.
Click to expand it.
tests/Doctrine/Tests/ORM/Query/LanguageRecognitionTest.php
View file @
b3d110ba
...
...
@@ -47,7 +47,7 @@ class LanguageRecognitionTest extends \Doctrine\Tests\OrmTestCase
}
$parser
=
new
\Doctrine\ORM\Query\Parser
(
$query
);
$parser
->
setSqlTreeWalker
(
new
\Doctrine\Tests\Mocks\MockTreeWalker
);
//
$parser->setSqlTreeWalker(new \Doctrine\Tests\Mocks\MockTreeWalker);
return
$parser
->
parse
();
}
...
...
@@ -67,11 +67,6 @@ class LanguageRecognitionTest extends \Doctrine\Tests\OrmTestCase
$this
->
assertValidDql
(
'SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u'
);
}
public
function
testInvalidSelectSingleComponentWithAsterisk
()
{
//$this->assertInvalidDql('SELECT p FROM Doctrine\Tests\Models\CMS\CmsUser u', true);
}
public
function
testSelectSingleComponentWithMultipleColumns
()
{
$this
->
assertValidDql
(
'SELECT u.name, u.username FROM Doctrine\Tests\Models\CMS\CmsUser u'
);
...
...
@@ -247,14 +242,14 @@ class LanguageRecognitionTest extends \Doctrine\Tests\OrmTestCase
{
$this
->
assertValidDql
(
"SELECT u.id FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.name LIKE 'z|%' ESCAPE '|'"
);
}
/*
public function testImplicitJoinInWhereOnSingleValuedAssociationPathExpression()
/*
public function testImplicitJoinInWhereOnSingleValuedAssociationPathExpression()
{
// This should be allowed because avatar is a single-value association.
// SQL: SELECT ... FROM forum_user fu INNER JOIN forum_avatar fa ON fu.avatar_id = fa.id WHERE fa.id = ?
$this->assertValidDql("SELECT u FROM Doctrine\Tests\Models\Forum\ForumUser u WHERE u.avatar.id = ?");
}
*/
}
*/
public
function
testImplicitJoinInWhereOnCollectionValuedPathExpression
()
{
// This should be forbidden, because articles is a collection
...
...
@@ -264,8 +259,7 @@ class LanguageRecognitionTest extends \Doctrine\Tests\OrmTestCase
public
function
testInvalidSyntaxIsRejected
()
{
$this
->
assertInvalidDql
(
"FOOBAR CmsUser"
);
//$this->assertInvalidDql("DELETE FROM Doctrine\Tests\Models\CMS\CmsUser.articles");
//$this->assertInvalidDql("DELETE FROM Doctrine\Tests\Models\CMS\CmsUser cu WHERE cu.articles.id > ?");
$this
->
assertInvalidDql
(
"DELETE FROM Doctrine\Tests\Models\CMS\CmsUser.articles"
);
$this
->
assertInvalidDql
(
"SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u JOIN u.articles.comments"
);
// Currently UNDEFINED OFFSET error
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment