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
7e4875f4
Commit
7e4875f4
authored
Jan 17, 2008
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some updates to new parser
parent
ef479892
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
17 deletions
+14
-17
AbstractSchemaName.php
draft/Doctrine/Query/Production/AbstractSchemaName.php
+1
-9
IdentificationVariable.php
draft/Doctrine/Query/Production/IdentificationVariable.php
+1
-0
IdentificationVariableDeclaration.php
...ne/Query/Production/IdentificationVariableDeclaration.php
+4
-3
Join.php
draft/Doctrine/Query/Production/Join.php
+1
-1
RangeVariableDeclaration.php
draft/Doctrine/Query/Production/RangeVariableDeclaration.php
+5
-2
query-language.txt
draft/query-language.txt
+2
-2
No files found.
draft/Doctrine/Query/Production/AbstractSchemaName.php
View file @
7e4875f4
...
...
@@ -49,22 +49,14 @@ class Doctrine_Query_Production_AbstractSchemaName extends Doctrine_Query_Produc
*/
public
function
execute
(
array
$params
=
array
())
{
$table
=
null
;
$token
=
$this
->
_parser
->
lookahead
;
if
(
$token
[
'type'
]
===
Doctrine_Query_Token
::
T_IDENTIFIER
)
{
$table
=
$this
->
_parser
->
getConnection
()
->
getTable
(
$token
[
'value'
]);
if
(
$table
===
null
)
{
$this
->
_parser
->
logError
(
'Table named "'
.
$name
.
'" does not exist.'
);
}
$this
->
_parser
->
match
(
Doctrine_Query_Token
::
T_IDENTIFIER
);
}
else
{
$this
->
_parser
->
logError
(
'Identifier expected'
);
}
return
$t
able
;
return
$t
oken
;
}
}
draft/Doctrine/Query/Production/IdentificationVariable.php
View file @
7e4875f4
...
...
@@ -15,5 +15,6 @@ class Doctrine_Query_Production_IdentificationVariable extends Doctrine_Query_Pr
$this->error('"' . $name . '" is not a identification variable.');
}
*/
return
$token
;
}
}
draft/Doctrine/Query/Production/IdentificationVariableDeclaration.php
View file @
7e4875f4
...
...
@@ -6,11 +6,12 @@ class Doctrine_Query_Production_IdentificationVariableDeclaration extends Doctri
{
public
function
execute
(
array
$params
=
array
())
{
$this
->
RangeVariableDeclaration
();
$
rangeVarDecl
=
$
this
->
RangeVariableDeclaration
();
while
(
$this
->
_isNextToken
(
Doctrine_Query_Token
::
T_LEFT
)
||
$this
->
_isNextToken
(
Doctrine_Query_Token
::
T_INNER
)
||
$this
->
_isNextToken
(
Doctrine_Query_Token
::
T_JOIN
))
{
$this
->
_isNextToken
(
Doctrine_Query_Token
::
T_INNER
)
||
$this
->
_isNextToken
(
Doctrine_Query_Token
::
T_JOIN
))
{
$this
->
Join
();
}
}
...
...
draft/Doctrine/Query/Production/Join.php
View file @
7e4875f4
...
...
@@ -19,7 +19,7 @@ class Doctrine_Query_Production_Join extends Doctrine_Query_Production
$this
->
_parser
->
match
(
Doctrine_Query_Token
::
T_JOIN
);
$this
->
PathExpress
ion
();
$this
->
RangeVariableDeclarat
ion
();
$this
->
_parser
->
match
(
Doctrine_Query_Token
::
T_AS
);
$this
->
_parser
->
match
(
Doctrine_Query_Token
::
T_IDENTIFIER
);
...
...
draft/Doctrine/Query/Production/RangeVariableDeclaration.php
View file @
7e4875f4
...
...
@@ -6,12 +6,15 @@ class Doctrine_Query_Production_RangeVariableDeclaration extends Doctrine_Query_
{
public
function
execute
(
array
$params
=
array
())
{
$this
->
AbstractSchemaName
();
$
abstractSchemaName
=
$
this
->
AbstractSchemaName
();
if
(
$this
->
_isNextToken
(
Doctrine_Query_Token
::
T_AS
))
{
$this
->
_parser
->
match
(
Doctrine_Query_Token
::
T_AS
);
}
$this
->
IdentificationVariable
();
$identifier
=
$this
->
IdentificationVariable
();
return
array
(
'abstractSchemaName'
=>
$abstractSchemaName
,
'identifier'
=>
$identifier
);
}
}
draft/query-language.txt
View file @
7e4875f4
...
...
@@ -36,8 +36,8 @@ UpdateItem = PathExpression "=" (Expression | "NULL")
IdentificationVariableDeclaration = RangeVariableDeclaration {Join}
RangeVariableDeclaration = AbstractSchemaName ["AS"] IdentificationVariable
Join = ["LEFT" | "INNER"] "JOIN"
PathExpression ["AS"] IdentificationVariable
[("ON" | "WITH") ConditionalExpression] [IndexBy]
IndexBy = "INDEXBY" PathExpression
Join = ["LEFT" | "INNER"] "JOIN"
RangeVariableDeclaration
[("ON" | "WITH") ConditionalExpression] [IndexBy]
IndexBy = "INDEX
" "
BY" PathExpression
ConditionalExpression = ConditionalTerm {"OR" ConditionalTerm}
ConditionalTerm = ConditionalFactor {"AND" ConditionalFactor}
...
...
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