From 4e62d4a98b04adf88a61ad5dffcbbc84e1a2b056 Mon Sep 17 00:00:00 2001 From: guilhermeblanco Date: Thu, 15 Jan 2009 03:26:42 +0000 Subject: [PATCH] More refactorings under DQL Parser/AST classes. Implemented new classes. Fixed a couple of issues around the road. --- .../Query/AST/RangeVariableDeclaration.php | 2 +- lib/Doctrine/ORM/Query/AST/SelectClause.php | 2 +- .../ORM/Query/Parser/AbstractSchemaName.php | 16 ++-- .../Parser/AliasIdentificationVariable.php | 14 ++-- .../CollectionValuedAssociationField.php} | 23 +---- .../EmbeddedClassStateField.php} | 23 +---- .../FieldAliasIdentificationVariable.php} | 44 +++++----- .../Parser/FieldIdentificationVariable.php | 21 +---- .../Query/Parser/IdentificationVariable.php | 14 ++-- .../IdentificationVariableDeclaration.php | 9 +- lib/Doctrine/ORM/Query/Parser/IndexBy.php | 6 +- .../JoinCollectionValuedPathExpression.php | 83 +++++++++++++++++++ .../Query/Parser/RangeVariableDeclaration.php | 4 +- .../ORM/Query/Parser/SimpleStateField.php | 13 +-- .../Parser/SimpleStateFieldPathExpression.php | 4 +- .../SingleValuedAssociationField.php} | 23 +---- lib/Doctrine/ORM/Query/Token.php | 68 +++++++-------- 17 files changed, 184 insertions(+), 185 deletions(-) rename lib/Doctrine/ORM/Query/{AST/FieldIdentificationVariable.php => Parser/CollectionValuedAssociationField.php} (73%) rename lib/Doctrine/ORM/Query/{AST/AbstractSchemaName.php => Parser/EmbeddedClassStateField.php} (72%) rename lib/Doctrine/ORM/Query/{AST/IdentificationVariable.php => Parser/FieldAliasIdentificationVariable.php} (57%) create mode 100644 lib/Doctrine/ORM/Query/Parser/JoinCollectionValuedPathExpression.php rename lib/Doctrine/ORM/Query/{AST/AliasIdentificationVariable.php => Parser/SingleValuedAssociationField.php} (71%) diff --git a/lib/Doctrine/ORM/Query/AST/RangeVariableDeclaration.php b/lib/Doctrine/ORM/Query/AST/RangeVariableDeclaration.php index 93cb63db8..1379f7b26 100644 --- a/lib/Doctrine/ORM/Query/AST/RangeVariableDeclaration.php +++ b/lib/Doctrine/ORM/Query/AST/RangeVariableDeclaration.php @@ -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 { diff --git a/lib/Doctrine/ORM/Query/AST/SelectClause.php b/lib/Doctrine/ORM/Query/AST/SelectClause.php index b38c7636f..ad5eca7dc 100644 --- a/lib/Doctrine/ORM/Query/AST/SelectClause.php +++ b/lib/Doctrine/ORM/Query/AST/SelectClause.php @@ -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; } } diff --git a/lib/Doctrine/ORM/Query/Parser/AbstractSchemaName.php b/lib/Doctrine/ORM/Query/Parser/AbstractSchemaName.php index 2297b1791..5b40e1930 100644 --- a/lib/Doctrine/ORM/Query/Parser/AbstractSchemaName.php +++ b/lib/Doctrine/ORM/Query/Parser/AbstractSchemaName.php @@ -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; } diff --git a/lib/Doctrine/ORM/Query/Parser/AliasIdentificationVariable.php b/lib/Doctrine/ORM/Query/Parser/AliasIdentificationVariable.php index d315e7c47..eca986a1c 100644 --- a/lib/Doctrine/ORM/Query/Parser/AliasIdentificationVariable.php +++ b/lib/Doctrine/ORM/Query/Parser/AliasIdentificationVariable.php @@ -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; } } diff --git a/lib/Doctrine/ORM/Query/AST/FieldIdentificationVariable.php b/lib/Doctrine/ORM/Query/Parser/CollectionValuedAssociationField.php similarity index 73% rename from lib/Doctrine/ORM/Query/AST/FieldIdentificationVariable.php rename to lib/Doctrine/ORM/Query/Parser/CollectionValuedAssociationField.php index 5ba81a262..1f66c7d83 100644 --- a/lib/Doctrine/ORM/Query/AST/FieldIdentificationVariable.php +++ b/lib/Doctrine/ORM/Query/Parser/CollectionValuedAssociationField.php @@ -20,29 +20,14 @@ */ /** - * FieldIdentificationVariable ::= identifier + * CollectionValuedAssociationField ::= FieldIdentificationVariable * * @author Guilherme Blanco + * @author Janne Vanhala * @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 diff --git a/lib/Doctrine/ORM/Query/AST/AbstractSchemaName.php b/lib/Doctrine/ORM/Query/Parser/EmbeddedClassStateField.php similarity index 72% rename from lib/Doctrine/ORM/Query/AST/AbstractSchemaName.php rename to lib/Doctrine/ORM/Query/Parser/EmbeddedClassStateField.php index 569480b50..d033c7a4c 100644 --- a/lib/Doctrine/ORM/Query/AST/AbstractSchemaName.php +++ b/lib/Doctrine/ORM/Query/Parser/EmbeddedClassStateField.php @@ -20,29 +20,14 @@ */ /** - * AbstractSchemaName ::= identifier + * EmbeddedClassStateField ::= FieldIdentificationVariable * * @author Guilherme Blanco + * @author Janne Vanhala * @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 diff --git a/lib/Doctrine/ORM/Query/AST/IdentificationVariable.php b/lib/Doctrine/ORM/Query/Parser/FieldAliasIdentificationVariable.php similarity index 57% rename from lib/Doctrine/ORM/Query/AST/IdentificationVariable.php rename to lib/Doctrine/ORM/Query/Parser/FieldAliasIdentificationVariable.php index 801e9f3fd..19e7e2a47 100644 --- a/lib/Doctrine/ORM/Query/AST/IdentificationVariable.php +++ b/lib/Doctrine/ORM/Query/Parser/FieldAliasIdentificationVariable.php @@ -20,41 +20,39 @@ */ /** - * IdentificationVariable ::= identifier + * FieldAliasIdentificationVariable ::= identifier * * @author Guilherme Blanco + * @author Janne Vanhala * @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() - { - return $this->_componentAlias; - } - - - /* REMOVE ME LATER. COPIED METHODS FROM SPLIT OF PRODUCTION INTO "AST" AND "PARSER" */ - - public function buildSql() - { - $conn = $this->_parserResult->getEntityManager()->getConnection(); - return $conn->quoteIdentifier( - $this->_parserResult->getTableAliasFromComponentAlias($this->_componentAlias) - ); + + public function semantical() + { + $parserResult = $this->_parser->getParserResult(); + + 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 . "'."; + + $this->_parser->semanticalError($message); + } + + return $this->_fieldAlias; } } \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/Parser/FieldIdentificationVariable.php b/lib/Doctrine/ORM/Query/Parser/FieldIdentificationVariable.php index f8eabd734..d25acff40 100644 --- a/lib/Doctrine/ORM/Query/Parser/FieldIdentificationVariable.php +++ b/lib/Doctrine/ORM/Query/Parser/FieldIdentificationVariable.php @@ -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']; } } diff --git a/lib/Doctrine/ORM/Query/Parser/IdentificationVariable.php b/lib/Doctrine/ORM/Query/Parser/IdentificationVariable.php index 00a417570..4568dbeab 100644 --- a/lib/Doctrine/ORM/Query/Parser/IdentificationVariable.php +++ b/lib/Doctrine/ORM/Query/Parser/IdentificationVariable.php @@ -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; } } diff --git a/lib/Doctrine/ORM/Query/Parser/IdentificationVariableDeclaration.php b/lib/Doctrine/ORM/Query/Parser/IdentificationVariableDeclaration.php index 58ff432af..b000e7f4d 100644 --- a/lib/Doctrine/ORM/Query/Parser/IdentificationVariableDeclaration.php +++ b/lib/Doctrine/ORM/Query/Parser/IdentificationVariableDeclaration.php @@ -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() - ->getSimpleStateFieldPathExpression()->getIdentificationVariable()->getComponentAlias(); + $indexComponentAlias = $this->_AST->getIndexBy()->getSimpleStateFieldPathExpression() + ->getIdentificationVariable(); // Check if we have same component being used in index if ($rangeComponentAlias !== $indexComponentAlias) { diff --git a/lib/Doctrine/ORM/Query/Parser/IndexBy.php b/lib/Doctrine/ORM/Query/Parser/IndexBy.php index 4e08fd6ab..2e1c233b8 100644 --- a/lib/Doctrine/ORM/Query/Parser/IndexBy.php +++ b/lib/Doctrine/ORM/Query/Parser/IndexBy.php @@ -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 { diff --git a/lib/Doctrine/ORM/Query/Parser/JoinCollectionValuedPathExpression.php b/lib/Doctrine/ORM/Query/Parser/JoinCollectionValuedPathExpression.php new file mode 100644 index 000000000..1e0c1da3c --- /dev/null +++ b/lib/Doctrine/ORM/Query/Parser/JoinCollectionValuedPathExpression.php @@ -0,0 +1,83 @@ +. + */ + +/** + * JoinCollectionValuedPathExpression ::= IdentificationVariable "." CollectionValuedAssociationField + * + * @author Guilherme Blanco + * @author Janne Vanhala + * @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; + } +} diff --git a/lib/Doctrine/ORM/Query/Parser/RangeVariableDeclaration.php b/lib/Doctrine/ORM/Query/Parser/RangeVariableDeclaration.php index 669fc59cc..3545db7d9 100644 --- a/lib/Doctrine/ORM/Query/Parser/RangeVariableDeclaration.php +++ b/lib/Doctrine/ORM/Query/Parser/RangeVariableDeclaration.php @@ -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)) { diff --git a/lib/Doctrine/ORM/Query/Parser/SimpleStateField.php b/lib/Doctrine/ORM/Query/Parser/SimpleStateField.php index ae1b6516c..7e0631647 100644 --- a/lib/Doctrine/ORM/Query/Parser/SimpleStateField.php +++ b/lib/Doctrine/ORM/Query/Parser/SimpleStateField.php @@ -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 diff --git a/lib/Doctrine/ORM/Query/Parser/SimpleStateFieldPathExpression.php b/lib/Doctrine/ORM/Query/Parser/SimpleStateFieldPathExpression.php index 94eae7232..05eaf020a 100644 --- a/lib/Doctrine/ORM/Query/Parser/SimpleStateFieldPathExpression.php +++ b/lib/Doctrine/ORM/Query/Parser/SimpleStateFieldPathExpression.php @@ -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 { diff --git a/lib/Doctrine/ORM/Query/AST/AliasIdentificationVariable.php b/lib/Doctrine/ORM/Query/Parser/SingleValuedAssociationField.php similarity index 71% rename from lib/Doctrine/ORM/Query/AST/AliasIdentificationVariable.php rename to lib/Doctrine/ORM/Query/Parser/SingleValuedAssociationField.php index 4db49e7d0..021188802 100644 --- a/lib/Doctrine/ORM/Query/AST/AliasIdentificationVariable.php +++ b/lib/Doctrine/ORM/Query/Parser/SingleValuedAssociationField.php @@ -20,29 +20,14 @@ */ /** - * AliasIdentificationVariable ::= identifier + * SingleValuedAssociationField ::= FieldIdentificationVariable * * @author Guilherme Blanco + * @author Janne Vanhala * @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 diff --git a/lib/Doctrine/ORM/Query/Token.php b/lib/Doctrine/ORM/Query/Token.php index 440086a9a..813ef12e5 100644 --- a/lib/Doctrine/ORM/Query/Token.php +++ b/lib/Doctrine/ORM/Query/Token.php @@ -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 = 144; - const T_FALSE = 145; + const T_TRUE = 145; + const T_FALSE = 146; 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");