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
260b9ae2
Commit
260b9ae2
authored
Dec 26, 2007
by
guilhermeblanco
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support to params in join methods of Doctrine_Query
parent
c2282dac
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
5 deletions
+19
-5
Query.php
lib/Doctrine/Query.php
+1
-1
Abstract.php
lib/Doctrine/Query/Abstract.php
+18
-4
No files found.
lib/Doctrine/Query.php
View file @
260b9ae2
...
@@ -294,7 +294,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable, Seria
...
@@ -294,7 +294,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable, Seria
*/
*/
public
function
getParams
()
public
function
getParams
()
{
{
return
array_merge
(
$this
->
_params
[
'set'
],
$this
->
_params
[
'where'
],
$this
->
_params
[
'having'
]);
return
array_merge
(
$this
->
_params
[
'
join'
],
$this
->
_params
[
'
set'
],
$this
->
_params
[
'where'
],
$this
->
_params
[
'having'
]);
}
}
/**
/**
...
...
lib/Doctrine/Query/Abstract.php
View file @
260b9ae2
...
@@ -102,7 +102,8 @@ abstract class Doctrine_Query_Abstract
...
@@ -102,7 +102,8 @@ abstract class Doctrine_Query_Abstract
/**
/**
* @var array $params The parameters of this query.
* @var array $params The parameters of this query.
*/
*/
protected
$_params
=
array
(
'where'
=>
array
(),
protected
$_params
=
array
(
'join'
=>
array
(),
'where'
=>
array
(),
'set'
=>
array
(),
'set'
=>
array
(),
'having'
=>
array
());
'having'
=>
array
());
...
@@ -913,7 +914,8 @@ abstract class Doctrine_Query_Abstract
...
@@ -913,7 +914,8 @@ abstract class Doctrine_Query_Abstract
*/
*/
public
function
execute
(
$params
=
array
(),
$hydrationMode
=
null
)
public
function
execute
(
$params
=
array
(),
$hydrationMode
=
null
)
{
{
$params
=
array_merge
(
$this
->
_params
[
'set'
],
$params
=
array_merge
(
$this
->
_params
[
'join'
],
$this
->
_params
[
'set'
],
$this
->
_params
[
'where'
],
$this
->
_params
[
'where'
],
$this
->
_params
[
'having'
],
$this
->
_params
[
'having'
],
$params
);
$params
);
...
@@ -1280,8 +1282,14 @@ abstract class Doctrine_Query_Abstract
...
@@ -1280,8 +1282,14 @@ abstract class Doctrine_Query_Abstract
* @param string $join Query INNER JOIN
* @param string $join Query INNER JOIN
* @return Doctrine_Query
* @return Doctrine_Query
*/
*/
public
function
innerJoin
(
$join
)
public
function
innerJoin
(
$join
,
$params
=
array
()
)
{
{
if
(
is_array
(
$params
))
{
$this
->
_params
[
'join'
]
=
array_merge
(
$this
->
_params
[
'join'
],
$params
);
}
else
{
$this
->
_params
[
'join'
][]
=
$params
;
}
return
$this
->
_addDqlQueryPart
(
'from'
,
'INNER JOIN '
.
$join
,
true
);
return
$this
->
_addDqlQueryPart
(
'from'
,
'INNER JOIN '
.
$join
,
true
);
}
}
...
@@ -1292,8 +1300,14 @@ abstract class Doctrine_Query_Abstract
...
@@ -1292,8 +1300,14 @@ abstract class Doctrine_Query_Abstract
* @param string $join Query LEFT JOIN
* @param string $join Query LEFT JOIN
* @return Doctrine_Query
* @return Doctrine_Query
*/
*/
public
function
leftJoin
(
$join
)
public
function
leftJoin
(
$join
,
$params
=
array
()
)
{
{
if
(
is_array
(
$params
))
{
$this
->
_params
[
'join'
]
=
array_merge
(
$this
->
_params
[
'join'
],
$params
);
}
else
{
$this
->
_params
[
'join'
][]
=
$params
;
}
return
$this
->
_addDqlQueryPart
(
'from'
,
'LEFT JOIN '
.
$join
,
true
);
return
$this
->
_addDqlQueryPart
(
'from'
,
'LEFT JOIN '
.
$join
,
true
);
}
}
...
...
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