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
4e62d4a9
Commit
4e62d4a9
authored
Jan 15, 2009
by
guilhermeblanco
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More refactorings under DQL Parser/AST classes.
Implemented new classes. Fixed a couple of issues around the road.
parent
f83f5c3c
Changes
17
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
182 additions
and
183 deletions
+182
-183
RangeVariableDeclaration.php
lib/Doctrine/ORM/Query/AST/RangeVariableDeclaration.php
+1
-1
SelectClause.php
lib/Doctrine/ORM/Query/AST/SelectClause.php
+1
-1
AbstractSchemaName.php
lib/Doctrine/ORM/Query/Parser/AbstractSchemaName.php
+6
-10
AliasIdentificationVariable.php
...Doctrine/ORM/Query/Parser/AliasIdentificationVariable.php
+6
-8
CollectionValuedAssociationField.php
...ine/ORM/Query/Parser/CollectionValuedAssociationField.php
+4
-19
EmbeddedClassStateField.php
lib/Doctrine/ORM/Query/Parser/EmbeddedClassStateField.php
+4
-19
FieldAliasIdentificationVariable.php
...ine/ORM/Query/Parser/FieldAliasIdentificationVariable.php
+19
-21
FieldIdentificationVariable.php
...Doctrine/ORM/Query/Parser/FieldIdentificationVariable.php
+1
-20
IdentificationVariable.php
lib/Doctrine/ORM/Query/Parser/IdentificationVariable.php
+6
-8
IdentificationVariableDeclaration.php
...ne/ORM/Query/Parser/IdentificationVariableDeclaration.php
+4
-5
IndexBy.php
lib/Doctrine/ORM/Query/Parser/IndexBy.php
+2
-4
JoinCollectionValuedPathExpression.php
...e/ORM/Query/Parser/JoinCollectionValuedPathExpression.php
+83
-0
RangeVariableDeclaration.php
lib/Doctrine/ORM/Query/Parser/RangeVariableDeclaration.php
+2
-2
SimpleStateField.php
lib/Doctrine/ORM/Query/Parser/SimpleStateField.php
+2
-11
SimpleStateFieldPathExpression.php
...trine/ORM/Query/Parser/SimpleStateFieldPathExpression.php
+2
-2
SingleValuedAssociationField.php
...octrine/ORM/Query/Parser/SingleValuedAssociationField.php
+4
-19
Token.php
lib/Doctrine/ORM/Query/Token.php
+35
-33
No files found.
lib/Doctrine/ORM/Query/AST/RangeVariableDeclaration.php
View file @
4e62d4a9
...
...
@@ -69,7 +69,7 @@ class Doctrine_ORM_Query_AST_RangeVariableDeclaration extends Doctrine_ORM_Query
$conn
=
$this
->
_parserResult
->
getEntityManager
()
->
getConnection
();
// Component alias
$componentAlias
=
$this
->
_aliasIdentificationVariable
->
getComponentAlias
()
;
$componentAlias
=
$this
->
_aliasIdentificationVariable
;
// Retrieving required information
try
{
...
...
lib/Doctrine/ORM/Query/AST/SelectClause.php
View file @
4e62d4a9
...
...
@@ -86,6 +86,6 @@ class Doctrine_ORM_Query_AST_SelectClause extends Doctrine_ORM_Query_AST
protected
function
_mapSelectExpression
(
$value
)
{
return
$value
->
buildSql
()
;
return
is_object
(
$value
)
?
$value
->
buildSql
()
:
$value
;
}
}
lib/Doctrine/ORM/Query/Parser/AbstractSchemaName.php
View file @
4e62d4a9
...
...
@@ -31,32 +31,28 @@
*/
class
Doctrine_ORM_Query_Parser_AbstractSchemaName
extends
Doctrine_ORM_Query_ParserRule
{
protected
$_
AST
=
null
;
protected
$_
componentName
=
null
;
public
function
syntax
()
{
// AbstractSchemaName ::= identifier
$this
->
_AST
=
$this
->
AST
(
'AbstractSchemaName'
);
$this
->
_parser
->
match
(
Doctrine_ORM_Query_Token
::
T_IDENTIFIER
);
$this
->
_
AST
->
setComponentName
(
$this
->
_parser
->
token
[
'value'
])
;
$this
->
_
componentName
=
$this
->
_parser
->
token
[
'value'
]
;
}
public
function
semantical
()
{
$componentName
=
$this
->
_AST
->
getComponentName
();
// Check if we are dealing with a real Doctrine_Entity or not
if
(
!
$this
->
_isDoctrineEntity
(
$componentName
))
{
if
(
!
$this
->
_isDoctrineEntity
(
$
this
->
_
componentName
))
{
$this
->
_parser
->
semanticalError
(
"Defined entity '"
.
$componentName
.
"' is not a valid entity."
"Defined entity '"
.
$
this
->
_
componentName
.
"' is not a valid entity."
);
}
// Return
AST node
return
$this
->
_
AST
;
// Return
Component Name identifier
return
$this
->
_
componentName
;
}
...
...
lib/Doctrine/ORM/Query/Parser/AliasIdentificationVariable.php
View file @
4e62d4a9
...
...
@@ -31,16 +31,14 @@
*/
class
Doctrine_ORM_Query_Parser_AliasIdentificationVariable
extends
Doctrine_ORM_Query_ParserRule
{
protected
$_
AST
=
null
;
protected
$_
componentAlias
=
null
;
public
function
syntax
()
{
// AliasIdentificationVariable = identifier
$this
->
_AST
=
$this
->
AST
(
'AliasIdentificationVariable'
);
$this
->
_parser
->
match
(
Doctrine_ORM_Query_Token
::
T_IDENTIFIER
);
$this
->
_
AST
->
setComponentAlias
(
$this
->
_parser
->
token
[
'value'
])
;
$this
->
_
componentAlias
=
$this
->
_parser
->
token
[
'value'
]
;
}
...
...
@@ -48,17 +46,17 @@ class Doctrine_ORM_Query_Parser_AliasIdentificationVariable extends Doctrine_ORM
{
$parserResult
=
$this
->
_parser
->
getParserResult
();
if
(
$parserResult
->
hasQueryComponent
(
$this
->
_
AST
->
getComponentAlias
()
))
{
if
(
$parserResult
->
hasQueryComponent
(
$this
->
_
componentAlias
))
{
// We should throw semantical error if there's already a component for this alias
$queryComponent
=
$parserResult
->
getQueryComponent
(
$this
->
_
AST
->
getComponentAlias
()
);
$queryComponent
=
$parserResult
->
getQueryComponent
(
$this
->
_
componentAlias
);
$componentName
=
$queryComponent
[
'metadata'
]
->
getClassName
();
$message
=
"Cannot re-declare component alias '"
.
$this
->
_
AST
->
getComponentAlias
()
.
"'. "
$message
=
"Cannot re-declare component alias '"
.
$this
->
_
componentAlias
.
"'. "
.
"It was already declared for component '"
.
$componentName
.
"'."
;
$this
->
_parser
->
semanticalError
(
$message
);
}
return
$this
->
_
AST
;
return
$this
->
_
componentAlias
;
}
}
lib/Doctrine/ORM/Query/
AST/FieldIdentificationVariable
.php
→
lib/Doctrine/ORM/Query/
Parser/CollectionValuedAssociationField
.php
View file @
4e62d4a9
...
...
@@ -20,29 +20,14 @@
*/
/**
*
FieldIdentificationVariable ::= identifier
*
CollectionValuedAssociationField ::= FieldIdentificationVariable
*
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Janne Vanhala <jpvanhal@cc.hut.fi>
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link http://www.phpdoctrine.org
* @since 2.0
* @version $Revision$
*/
class
Doctrine_ORM_Query_AST_FieldIdentificationVariable
extends
Doctrine_ORM_Query_AST
{
protected
$_fieldName
;
/* Setters */
public
function
setFieldName
(
$fieldName
)
{
$this
->
_fieldName
=
$fieldName
;
}
/* Getters */
public
function
getFieldName
()
{
return
$this
->
_fieldName
;
}
}
\ No newline at end of file
class
Doctrine_ORM_Query_Parser_CollectionValuedAssociationField
extends
Doctrine_ORM_Query_Parser_FieldIdentificationVariable
{
}
\ No newline at end of file
lib/Doctrine/ORM/Query/
AST/AbstractSchemaName
.php
→
lib/Doctrine/ORM/Query/
Parser/EmbeddedClassStateField
.php
View file @
4e62d4a9
...
...
@@ -20,29 +20,14 @@
*/
/**
*
AbstractSchemaName ::= identifier
*
EmbeddedClassStateField ::= FieldIdentificationVariable
*
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Janne Vanhala <jpvanhal@cc.hut.fi>
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link http://www.phpdoctrine.org
* @since 2.0
* @version $Revision$
*/
class
Doctrine_ORM_Query_AST_AbstractSchemaName
extends
Doctrine_ORM_Query_AST
{
protected
$_componentName
;
/* Setters */
public
function
setComponentName
(
$componentName
)
{
$this
->
_componentName
=
$componentName
;
}
/* Getters */
public
function
getComponentName
()
{
return
$this
->
_componentName
;
}
}
\ No newline at end of file
class
Doctrine_ORM_Query_Parser_EmbeddedClassStateField
extends
Doctrine_ORM_Query_Parser_FieldIdentificationVariable
{
}
\ No newline at end of file
lib/Doctrine/ORM/Query/
AST/
IdentificationVariable.php
→
lib/Doctrine/ORM/Query/
Parser/FieldAlias
IdentificationVariable.php
View file @
4e62d4a9
...
...
@@ -20,41 +20,39 @@
*/
/**
* IdentificationVariable ::= identifier
*
FieldAlias
IdentificationVariable ::= identifier
*
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Janne Vanhala <jpvanhal@cc.hut.fi>
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link http://www.phpdoctrine.org
* @since 2.0
* @version $Revision$
*/
class
Doctrine_ORM_Query_
AST_IdentificationVariable
extends
Doctrine_ORM_Query_AST
class
Doctrine_ORM_Query_
Parser_FieldAliasIdentificationVariable
extends
Doctrine_ORM_Query_Parser
{
protected
$_
componentAlias
;
protected
$_
fieldAlias
=
null
;
/* Setters */
public
function
setComponentAlias
(
$componentAlias
)
public
function
syntax
()
{
$this
->
_componentAlias
=
$componentAlias
;
// AliasIdentificationVariable = identifier
$this
->
_parser
->
match
(
Doctrine_ORM_Query_Token
::
T_IDENTIFIER
);
$this
->
_fieldAlias
=
$this
->
_parser
->
token
[
'value'
];
}
/* Getters */
public
function
getComponentAlias
()
public
function
semantical
()
{
return
$this
->
_componentAlias
;
}
$parserResult
=
$this
->
_parser
->
getParserResult
();
/* REMOVE ME LATER. COPIED METHODS FROM SPLIT OF PRODUCTION INTO "AST" AND "PARSER" */
if
(
$parserResult
->
hasFieldAlias
(
$this
->
_fieldAlias
))
{
// We should throw semantical error if there's already a field for this alias
$message
=
"Cannot re-declare field alias '"
.
$this
->
_fieldAlias
.
"'."
;
public
function
buildSql
()
{
$conn
=
$this
->
_parserResult
->
getEntityManager
()
->
getConnection
();
$this
->
_parser
->
semanticalError
(
$message
);
}
return
$conn
->
quoteIdentifier
(
$this
->
_parserResult
->
getTableAliasFromComponentAlias
(
$this
->
_componentAlias
)
);
return
$this
->
_fieldAlias
;
}
}
\ No newline at end of file
lib/Doctrine/ORM/Query/Parser/FieldIdentificationVariable.php
View file @
4e62d4a9
...
...
@@ -31,29 +31,10 @@
*/
class
Doctrine_ORM_Query_Parser_FieldIdentificationVariable
extends
Doctrine_ORM_Query_ParserRule
{
protected
$_AST
=
null
;
public
function
syntax
()
{
// FieldIdentificationVariable ::= identifier
$this
->
_AST
=
$this
->
AST
(
'FieldIdentificationVariable'
);
$this
->
_parser
->
match
(
Doctrine_ORM_Query_Token
::
T_IDENTIFIER
);
$this
->
_AST
->
setFieldName
(
$this
->
_parser
->
token
[
'value'
]);
// Return AST node
return
$this
->
_AST
;
}
public
function
semantical
()
{
$parserResult
=
$this
->
_parser
->
getParserResult
();
// [TODO] Check for field existance somewhere
// Return AST node
return
$this
->
_AST
;
return
$this
->
_parser
->
token
[
'value'
];
}
}
lib/Doctrine/ORM/Query/Parser/IdentificationVariable.php
View file @
4e62d4a9
...
...
@@ -31,16 +31,14 @@
*/
class
Doctrine_ORM_Query_Parser_IdentificationVariable
extends
Doctrine_ORM_Query_ParserRule
{
protected
$_
AST
=
null
;
protected
$_
componentAlias
=
null
;
public
function
syntax
()
{
// IdentificationVariable ::= identifier
$this
->
_AST
=
$this
->
AST
(
'IdentificationVariable'
);
$this
->
_parser
->
match
(
Doctrine_ORM_Query_Token
::
T_IDENTIFIER
);
$this
->
_
AST
->
setComponentAlias
(
$this
->
_parser
->
token
[
'value'
])
;
$this
->
_
componentAlias
=
$this
->
_parser
->
token
[
'value'
]
;
}
...
...
@@ -48,15 +46,15 @@ class Doctrine_ORM_Query_Parser_IdentificationVariable extends Doctrine_ORM_Quer
{
$parserResult
=
$this
->
_parser
->
getParserResult
();
if
(
!
$parserResult
->
hasQueryComponent
(
$this
->
_
AST
->
getComponentAlias
()
))
{
if
(
!
$parserResult
->
hasQueryComponent
(
$this
->
_
componentAlias
))
{
// We should throw semantical error if we cannot find the component alias
$message
=
"No entity related to declared alias '"
.
$this
->
_
AST
->
getComponentAlias
()
$message
=
"No entity related to declared alias '"
.
$this
->
_
componentAlias
.
"' near '"
.
$this
->
_parser
->
getQueryPiece
(
$this
->
_parser
->
token
)
.
"'."
;
$this
->
_parser
->
semanticalError
(
$message
);
}
// Return
AST node
return
$this
->
_
AST
;
// Return
Component Alias identifier
return
$this
->
_
componentAlias
;
}
}
lib/Doctrine/ORM/Query/Parser/IdentificationVariableDeclaration.php
View file @
4e62d4a9
...
...
@@ -60,12 +60,11 @@ class Doctrine_ORM_Query_Parser_IdentificationVariableDeclaration extends Doctri
// If we have an INDEX BY RangeVariableDeclaration
if
(
$this
->
_AST
->
getIndexby
()
!==
null
)
{
// Grab Range component alias
$rangeComponentAlias
=
$this
->
_AST
->
getRangeVariableDeclaration
()
->
getAliasIdentificationVariable
()
->
getComponentAlias
();
$rangeComponentAlias
=
$this
->
_AST
->
getRangeVariableDeclaration
()
->
getAliasIdentificationVariable
();
// Grab IndexBy component alias
$indexComponentAlias
=
$this
->
_AST
->
getIndexBy
()
->
get
SimpleStateFieldPathExpression
()
->
getIdentificationVariable
()
->
getComponentAlias
();
$indexComponentAlias
=
$this
->
_AST
->
getIndexBy
()
->
getSimpleStateFieldPathExpression
()
->
get
IdentificationVariable
();
// Check if we have same component being used in index
if
(
$rangeComponentAlias
!==
$indexComponentAlias
)
{
...
...
lib/Doctrine/ORM/Query/Parser/IndexBy.php
View file @
4e62d4a9
...
...
@@ -52,10 +52,8 @@ class Doctrine_ORM_Query_Parser_IndexBy extends Doctrine_ORM_Query_ParserRule
$parserResult
=
$this
->
_parser
->
getParserResult
();
// Grab INDEX BY information
$componentAlias
=
$this
->
_AST
->
getSimpleStateFieldPathExpression
()
->
getIdentificationVariable
()
->
getComponentAlias
();
$componentFieldName
=
$this
->
_AST
->
getSimpleStateFieldPathExpression
()
->
getSimpleStateField
()
->
getFieldName
();
$componentAlias
=
$this
->
_AST
->
getSimpleStateFieldPathExpression
()
->
getIdentificationVariable
();
$componentFieldName
=
$this
->
_AST
->
getSimpleStateFieldPathExpression
()
->
getSimpleStateField
();
// Trying to retrieve related query component
try
{
...
...
lib/Doctrine/ORM/Query/Parser/JoinCollectionValuedPathExpression.php
0 → 100644
View file @
4e62d4a9
<?php
/*
* $Id$
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many individuals
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.org>.
*/
/**
* JoinCollectionValuedPathExpression ::= IdentificationVariable "." CollectionValuedAssociationField
*
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Janne Vanhala <jpvanhal@cc.hut.fi>
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link http://www.phpdoctrine.org
* @since 2.0
* @version $Revision$
*/
class
Doctrine_ORM_Query_Parser_JoinCollectionValuedPathExpression
extends
Doctrine_ORM_Query_ParserRule
{
protected
$_AST
=
null
;
public
function
syntax
()
{
// JoinCollectionValuedPathExpression ::= IdentificationVariable "." CollectionValuedAssociationField
$this
->
_AST
=
$this
->
AST
(
'JoinCollectionValuedPathExpression'
);
$this
->
_AST
->
setIdentificationVariable
(
$this
->
parse
(
'IdentificationVariable'
));
$this
->
_parser
->
match
(
Doctrine_ORM_Query_Token
::
T_DOT
);
$this
->
_AST
->
setCollectionValuedAssociationField
(
$this
->
parse
(
'CollectionValuedAssociationField'
));
}
public
function
semantical
()
{
$parserResult
=
$this
->
_parser
->
getParserResult
();
$queryComponent
=
$parserResult
->
getQueryComponent
(
$this
->
_AST
->
setIdentificationVariable
());
$fieldName
=
$this
->
_AST
->
setCollectionValuedAssociationField
();
if
(
!
$queryComponent
[
'metadata'
]
->
hasField
(
$fieldName
))
{
$componentName
=
$queryComponent
[
'metadata'
]
->
getClassName
();
$message
=
"Field '"
.
$fieldName
.
"' does not exist in component '"
.
$componentName
.
"'."
;
$this
->
_parser
->
semanticalError
(
$message
);
}
if
(
!
$queryComponent
[
'metadata'
]
->
hasAssociation
(
$fieldName
))
{
$componentName
=
$queryComponent
[
'metadata'
]
->
getClassName
();
$message
=
"Field '"
.
$fieldName
.
"' is not an association in component '"
.
$componentName
.
"'."
;
$this
->
_parser
->
semanticalError
(
$message
);
}
$mapping
=
$queryComponent
[
'metadata'
]
->
getAssociation
(
$fieldName
);
if
(
$mapping
instanceof
Doctrine_ORM_Mapping_OneToOneMapping
)
{
$componentName
=
$queryComponent
[
'metadata'
]
->
getClassName
();
$message
=
"Field '"
.
$fieldName
.
"' does not map to a collection valued association in component '"
.
$componentName
.
"'."
;
$this
->
_parser
->
semanticalError
(
$message
);
}
return
$this
->
_AST
;
}
}
lib/Doctrine/ORM/Query/Parser/RangeVariableDeclaration.php
View file @
4e62d4a9
...
...
@@ -52,8 +52,8 @@ class Doctrine_ORM_Query_Parser_RangeVariableDeclaration extends Doctrine_ORM_Qu
public
function
semantical
()
{
$parserResult
=
$this
->
_parser
->
getParserResult
();
$componentName
=
$this
->
_AST
->
getAbstractSchemaName
()
->
getComponentName
()
;
$componentAlias
=
$this
->
_AST
->
getAliasIdentificationVariable
()
->
getComponentAlias
()
;
$componentName
=
$this
->
_AST
->
getAbstractSchemaName
();
$componentAlias
=
$this
->
_AST
->
getAliasIdentificationVariable
();
// Check if we already have a component defined without an alias
if
(
$componentAlias
===
null
&&
$parserResult
->
hasQueryComponent
(
$componentName
))
{
...
...
lib/Doctrine/ORM/Query/Parser/SimpleStateField.php
View file @
4e62d4a9
...
...
@@ -29,14 +29,5 @@
* @since 2.0
* @version $Revision$
*/
class
Doctrine_ORM_Query_Parser_SimpleStateField
extends
Doctrine_ORM_Query_ParserRule
{
protected
$_AST
=
null
;
public
function
syntax
()
{
// SimpleStateField ::= FieldIdentificationVariable
return
$this
->
parse
(
'FieldIdentificationVariable'
);
}
}
\ No newline at end of file
class
Doctrine_ORM_Query_Parser_SimpleStateField
extends
Doctrine_ORM_Query_Parser_FieldIdentificationVariable
{
}
\ No newline at end of file
lib/Doctrine/ORM/Query/Parser/SimpleStateFieldPathExpression.php
View file @
4e62d4a9
...
...
@@ -50,8 +50,8 @@ class Doctrine_ORM_Query_Parser_SimpleStateFieldPathExpression extends Doctrine_
public
function
semantical
()
{
$parserResult
=
$this
->
_parser
->
getParserResult
();
$componentAlias
=
$this
->
_AST
->
getIdentificationVariable
()
->
getComponentAlias
()
;
$componentFieldName
=
$this
->
_AST
->
getSimpleStateField
()
->
getFieldName
()
;
$componentAlias
=
$this
->
_AST
->
getIdentificationVariable
();
$componentFieldName
=
$this
->
_AST
->
getSimpleStateField
();
// We need to make sure field exists
try
{
...
...
lib/Doctrine/ORM/Query/
AST/AliasIdentificationVariable
.php
→
lib/Doctrine/ORM/Query/
Parser/SingleValuedAssociationField
.php
View file @
4e62d4a9
...
...
@@ -20,29 +20,14 @@
*/
/**
*
AliasIdentificationVariable ::= identifier
*
SingleValuedAssociationField ::= FieldIdentificationVariable
*
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Janne Vanhala <jpvanhal@cc.hut.fi>
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link http://www.phpdoctrine.org
* @since 2.0
* @version $Revision$
*/
class
Doctrine_ORM_Query_AST_AliasIdentificationVariable
extends
Doctrine_ORM_Query_AST
{
protected
$_componentAlias
;
/* Setters */
public
function
setComponentAlias
(
$componentAlias
)
{
$this
->
_componentAlias
=
$componentAlias
;
}
/* Getters */
public
function
getComponentAlias
()
{
return
$this
->
_componentAlias
;
}
}
\ No newline at end of file
class
Doctrine_ORM_Query_Parser_SingleValuedAssociationField
extends
Doctrine_ORM_Query_Parser_FieldIdentificationVariable
{
}
\ No newline at end of file
lib/Doctrine/ORM/Query/Token.php
View file @
4e62d4a9
...
...
@@ -50,40 +50,41 @@ final class Doctrine_ORM_Query_Token
const
T_DELETE
=
110
;
const
T_DESC
=
111
;
const
T_DISTINCT
=
112
;
const
T_ESCAPE
=
113
;
const
T_EXISTS
=
114
;
const
T_FROM
=
115
;
const
T_GROUP
=
116
;
const
T_HAVING
=
117
;
const
T_IN
=
118
;
const
T_INDEX
=
119
;
const
T_INNER
=
120
;
const
T_IS
=
121
;
const
T_JOIN
=
122
;
const
T_LEFT
=
123
;
const
T_LIKE
=
124
;
const
T_LIMIT
=
125
;
const
T_MAX
=
126
;
const
T_MIN
=
127
;
const
T_MOD
=
128
;
const
T_NOT
=
129
;
const
T_NULL
=
130
;
const
T_OFFSET
=
131
;
const
T_ON
=
132
;
const
T_OR
=
133
;
const
T_ORDER
=
134
;
const
T_OUTER
=
135
;
const
T_SELECT
=
136
;
const
T_SET
=
137
;
const
T_SIZE
=
138
;
const
T_SOME
=
139
;
const
T_SUM
=
140
;
const
T_UPDATE
=
141
;
const
T_WHERE
=
142
;
const
T_WITH
=
143
;
const
T_DOT
=
113
;
const
T_ESCAPE
=
114
;
const
T_EXISTS
=
115
;
const
T_FROM
=
116
;
const
T_GROUP
=
117
;
const
T_HAVING
=
118
;
const
T_IN
=
119
;
const
T_INDEX
=
120
;
const
T_INNER
=
121
;
const
T_IS
=
122
;
const
T_JOIN
=
123
;
const
T_LEFT
=
124
;
const
T_LIKE
=
125
;
const
T_LIMIT
=
126
;
const
T_MAX
=
127
;
const
T_MIN
=
128
;
const
T_MOD
=
129
;
const
T_NOT
=
130
;
const
T_NULL
=
131
;
const
T_OFFSET
=
132
;
const
T_ON
=
133
;
const
T_OR
=
134
;
const
T_ORDER
=
135
;
const
T_OUTER
=
136
;
const
T_SELECT
=
137
;
const
T_SET
=
138
;
const
T_SIZE
=
139
;
const
T_SOME
=
140
;
const
T_SUM
=
141
;
const
T_UPDATE
=
142
;
const
T_WHERE
=
143
;
const
T_WITH
=
144
;
const
T_TRUE
=
14
4
;
const
T_FALSE
=
14
5
;
const
T_TRUE
=
14
5
;
const
T_FALSE
=
14
6
;
protected
$_keywordsTable
=
array
();
...
...
@@ -103,6 +104,7 @@ final class Doctrine_ORM_Query_Token
$this
->
addKeyword
(
self
::
T_DELETE
,
"DELETE"
);
$this
->
addKeyword
(
self
::
T_DESC
,
"DESC"
);
$this
->
addKeyword
(
self
::
T_DISTINCT
,
"DISTINCT"
);
$this
->
addKeyword
(
self
::
T_DOT
,
"."
);
$this
->
addKeyword
(
self
::
T_ESCAPE
,
"ESPACE"
);
$this
->
addKeyword
(
self
::
T_EXISTS
,
"EXISTS"
);
$this
->
addKeyword
(
self
::
T_FALSE
,
"FALSE"
);
...
...
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