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
e5d43b2f
Commit
e5d43b2f
authored
Dec 10, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added parseSubquery()
parent
108403f3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
12 deletions
+15
-12
Query.php
lib/Doctrine/Query.php
+15
-12
No files found.
lib/Doctrine/Query.php
View file @
e5d43b2f
...
@@ -727,18 +727,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable, Seria
...
@@ -727,18 +727,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable, Seria
}
}
$term
[
0
]
=
$expr
;
$term
[
0
]
=
$expr
;
}
else
{
}
else
{
$trimmed
=
trim
(
$this
->
_tokenizer
->
bracketTrim
(
$term
[
0
]));
$term
[
0
]
=
$this
->
parseSubquery
(
$term
[
0
]);
// check for possible subqueries
if
(
substr
(
$trimmed
,
0
,
4
)
==
'FROM'
||
substr
(
$trimmed
,
0
,
6
)
==
'SELECT'
)
{
// parse subquery
$trimmed
=
$this
->
createSubquery
()
->
parseDqlQuery
(
$trimmed
)
->
getQuery
();
}
else
{
// parse normal clause
$trimmed
=
$this
->
parseClause
(
$trimmed
);
}
$term
[
0
]
=
'('
.
$trimmed
.
')'
;
}
}
}
else
{
}
else
{
if
(
substr
(
$term
[
0
],
0
,
1
)
!==
"'"
&&
substr
(
$term
[
0
],
-
1
)
!==
"'"
)
{
if
(
substr
(
$term
[
0
],
0
,
1
)
!==
"'"
&&
substr
(
$term
[
0
],
-
1
)
!==
"'"
)
{
...
@@ -849,7 +838,21 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable, Seria
...
@@ -849,7 +838,21 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable, Seria
}
}
return
$str
;
return
$str
;
}
}
public
function
parseSubquery
(
$subquery
)
{
$trimmed
=
trim
(
$this
->
_tokenizer
->
bracketTrim
(
$subquery
));
// check for possible subqueries
if
(
substr
(
$trimmed
,
0
,
4
)
==
'FROM'
||
substr
(
$trimmed
,
0
,
6
)
==
'SELECT'
)
{
// parse subquery
$trimmed
=
$this
->
createSubquery
()
->
parseDqlQuery
(
$trimmed
)
->
getQuery
();
}
else
{
// parse normal clause
$trimmed
=
$this
->
parseClause
(
$trimmed
);
}
return
'('
.
$trimmed
.
')'
;
}
/**
/**
* parseAggregateFunction
* parseAggregateFunction
* parses an aggregate function and returns the parsed form
* parses an aggregate function and returns the parsed form
...
...
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