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
1473df19
Commit
1473df19
authored
Aug 11, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new DQL WHERE parser
parent
b83321e5
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
86 additions
and
162 deletions
+86
-162
From.php
lib/Doctrine/Query/From.php
+4
-3
JoinCondition.php
lib/Doctrine/Query/JoinCondition.php
+1
-1
Where.php
lib/Doctrine/Query/Where.php
+81
-158
No files found.
lib/Doctrine/Query/From.php
View file @
1473df19
...
...
@@ -73,13 +73,14 @@ class Doctrine_Query_From extends Doctrine_Query_Part
foreach
(
Doctrine_Tokenizer
::
bracketExplode
(
$part
,
','
)
as
$reference
)
{
$reference
=
trim
(
$reference
);
$e
=
explode
(
'.'
,
$reference
);
$e
=
explode
(
' '
,
$reference
);
$e2
=
explode
(
'.'
,
$e
[
0
]);
if
(
$operator
)
{
$
reference
=
array_shift
(
$e
)
.
$operator
.
implode
(
'.'
,
$e
);
$
e
[
0
]
=
array_shift
(
$e2
)
.
$operator
.
implode
(
'.'
,
$e2
);
}
$table
=
$this
->
query
->
load
(
$reference
);
$table
=
$this
->
query
->
load
(
implode
(
' '
,
$e
)
);
}
$operator
=
(
$last
==
'INNER'
)
?
':'
:
'.'
;
...
...
lib/Doctrine/Query/JoinCondition.php
View file @
1473df19
...
...
@@ -58,7 +58,7 @@ class Doctrine_Query_JoinCondition extends Doctrine_Query_Condition
if
(
substr
(
$trimmed
,
0
,
4
)
==
'FROM'
||
substr
(
$trimmed
,
0
,
6
)
==
'SELECT'
)
{
// subquery found
$q
=
new
Doctrine_Q
uery
();
$q
=
$this
->
query
->
createSubq
uery
();
$value
=
'('
.
$q
->
parseQuery
(
$trimmed
)
->
getQuery
()
.
')'
;
}
elseif
(
substr
(
$trimmed
,
0
,
4
)
==
'SQL:'
)
{
$value
=
'('
.
substr
(
$trimmed
,
4
)
.
')'
;
...
...
lib/Doctrine/Query/Where.php
View file @
1473df19
This diff is collapsed.
Click to expand it.
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