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
733556b6
Commit
733556b6
authored
Aug 04, 2009
by
guilhermeblanco
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[2.0] Minor change in *Walker to be able to be used by custom assigned Walkers
parent
0a497062
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
6 deletions
+18
-6
Parser.php
lib/Doctrine/ORM/Query/Parser.php
+2
-1
SqlWalker.php
lib/Doctrine/ORM/Query/SqlWalker.php
+2
-5
TreeWalker.php
lib/Doctrine/ORM/Query/TreeWalker.php
+9
-0
TreeWalkerAdapter.php
lib/Doctrine/ORM/Query/TreeWalkerAdapter.php
+5
-0
No files found.
lib/Doctrine/ORM/Query/Parser.php
View file @
733556b6
...
@@ -257,7 +257,8 @@ class Parser
...
@@ -257,7 +257,8 @@ class Parser
}
}
// Create TreeWalker who creates the SQL from the AST
// Create TreeWalker who creates the SQL from the AST
$treeWalker
=
$this
->
_treeWalker
?:
new
SqlWalker
(
$treeWalker
=
$this
->
_treeWalker
?:
new
SqlWalker
();
$treeWalker
->
init
(
$this
->
_query
,
$this
->
_parserResult
,
$this
->
_queryComponents
$this
->
_query
,
$this
->
_parserResult
,
$this
->
_queryComponents
);
);
...
...
lib/Doctrine/ORM/Query/SqlWalker.php
View file @
733556b6
...
@@ -72,12 +72,9 @@ class SqlWalker implements TreeWalker
...
@@ -72,12 +72,9 @@ class SqlWalker implements TreeWalker
private
$_useSqlTableAliases
=
true
;
private
$_useSqlTableAliases
=
true
;
/**
/**
* Initializes a new SqlWalker instance with the given Query and ParserResult.
* @inheritdoc
*
* @param Query $query The parsed Query.
* @param ParserResult $parserResult The result of the parsing process.
*/
*/
public
function
__construc
t
(
$query
,
$parserResult
,
array
$queryComponents
)
public
function
ini
t
(
$query
,
$parserResult
,
array
$queryComponents
)
{
{
$this
->
_rsm
=
$parserResult
->
getResultSetMapping
();
$this
->
_rsm
=
$parserResult
->
getResultSetMapping
();
$this
->
_query
=
$query
;
$this
->
_query
=
$query
;
...
...
lib/Doctrine/ORM/Query/TreeWalker.php
View file @
733556b6
...
@@ -29,6 +29,15 @@ namespace Doctrine\ORM\Query;
...
@@ -29,6 +29,15 @@ namespace Doctrine\ORM\Query;
*/
*/
interface
TreeWalker
interface
TreeWalker
{
{
/**
* Initializes TreeWalker with important information about the ASTs to be walked
*
* @param Query $query The parsed Query.
* @param ParserResult $parserResult The result of the parsing process.
* @param array $queryComponents Query components (symbol table)
*/
function
init
(
$query
,
$parserResult
,
array
$queryComponents
);
/**
/**
* Walks down a SelectStatement AST node, thereby generating the appropriate SQL.
* Walks down a SelectStatement AST node, thereby generating the appropriate SQL.
*
*
...
...
lib/Doctrine/ORM/Query/TreeWalkerAdapter.php
View file @
733556b6
...
@@ -30,6 +30,11 @@ namespace Doctrine\ORM\Query;
...
@@ -30,6 +30,11 @@ namespace Doctrine\ORM\Query;
*/
*/
abstract
class
TreeWalkerAdapter
implements
TreeWalker
abstract
class
TreeWalkerAdapter
implements
TreeWalker
{
{
/**
* @inheritdoc
*/
public
function
init
(
$query
,
$parserResult
,
array
$queryComponents
)
{}
/**
/**
* Walks down a SelectStatement AST node, thereby generating the appropriate SQL.
* Walks down a SelectStatement AST node, thereby generating the appropriate SQL.
*
*
...
...
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