Parser
public class Parser
www.doctrine-project.org
Constructor Summary | |
---|---|
Creates a new query parser object. |
Method Summary | |
---|---|
string | AbstractSchemaName ::= identifier |
\Doctrine\ORM\Query\AST\AggregateExpression | AggregateExpression ::= ("AVG" | "MAX" | "MIN" | "SUM") "(" ["DISTINCT"] StateFieldPathExpression ")" | "COUNT" "(" ["DISTINCT"] (IdentificationVariable | SingleValuedPathExpression) ")" |
string | AliasIdentificationVariable = identifier |
string | AliasResultVariable ::= identifier |
\Doctrine\ORM\Query\AST\ArithmeticExpression | ArithmeticExpression ::= SimpleArithmeticExpression | "(" Subselect ")" |
\Doctrine\ORM\Query\AST\ArithmeticFactor | ArithmeticFactor ::= [("+" | "-")] ArithmeticPrimary |
void | ArithmeticPrimary ::= SingleValuedPathExpression | Literal | "(" SimpleArithmeticExpression ")" | FunctionsReturningNumerics | AggregateExpression | FunctionsReturningStrings | FunctionsReturningDatetime | IdentificationVariable |
\Doctrine\ORM\Query\AST\ArithmeticTerm | ArithmeticTerm ::= ArithmeticFactor {("*" | "/") ArithmeticFactor} |
\Doctrine\ORM\Query\AST\PathExpression | AssociationPathExpression ::= CollectionValuedPathExpression | SingleValuedAssociationPathExpression |
\Doctrine\ORM\Query\AST\BetweenExpression | BetweenExpression ::= ArithmeticExpression ["NOT"] "BETWEEN" ArithmeticExpression "AND" ArithmeticExpression |
void | |
\Doctrine\ORM\Query\AST\CollectionMemberExpression | CollectionMemberExpression ::= EntityExpression ["NOT"] "MEMBER" ["OF"] CollectionValuedPathExpressionEntityExpression ::= SingleValuedAssociationPathExpression | SimpleEntityExpression SimpleEntityExpression ::= IdentificationVariable | InputParameter |
\Doctrine\ORM\Query\AST\PathExpression | CollectionValuedPathExpression() CollectionValuedPathExpression ::= IdentificationVariable "." {SingleValuedAssociationField "."}* CollectionValuedAssociationField |
\Doctrine\ORM\Query\AST\ComparisonExpression | ComparisonExpression ::= ArithmeticExpression ComparisonOperator ( QuantifiedExpression | ArithmeticExpression ) |
string | ComparisonOperator ::= "=" | "=" | "!=" |
\Doctrine\ORM\Query\AST\ConditionalExpression | ConditionalExpression ::= ConditionalTerm {"OR" ConditionalTerm} |
\Doctrine\ORM\Query\AST\ConditionalFactor | ConditionalFactor ::= ["NOT"] ConditionalPrimary |
Doctrine\ORM\Query\AST\ConditionalPrimary | ConditionalPrimary ::= SimpleConditionalExpression | "(" ConditionalExpression ")" |
\Doctrine\ORM\Query\AST\ConditionalTerm | ConditionalTerm ::= ConditionalFactor {"AND" ConditionalFactor} |
void | |
void | |
void | |
\Doctrine\ORM\Query\AST\DeleteClause | DeleteClause ::= "DELETE" ["FROM"] AbstractSchemaName ["AS"] AliasIdentificationVariable |
\Doctrine\ORM\Query\AST\DeleteStatement | DeleteStatement ::= DeleteClause [WhereClause] |
\Doctrine\ORM\Query\AST\EmptyCollectionComparisonExpression | EmptyCollectionComparisonExpression() EmptyCollectionComparisonExpression ::= CollectionValuedPathExpression "IS" ["NOT"] "EMPTY" |
\Doctrine\ORM\Query\AST\SingleValuedAssociationPathExpression | EntityExpression ::= SingleValuedAssociationPathExpression | SimpleEntityExpression |
\Doctrine\ORM\Query\AST\ExistsExpression | ExistsExpression ::= ["NOT"] "EXISTS" "(" Subselect ")" |
\Doctrine\ORM\Query\AST\FromClause | FromClause ::= "FROM" IdentificationVariableDeclaration {"," IdentificationVariableDeclaration} |
void | FunctionDeclaration ::= FunctionsReturningStrings | FunctionsReturningNumerics | FunctionsReturningDatetime |
void | FunctionsReturningDateTime ::= "CURRENT_DATE" | "CURRENT_TIME" | "CURRENT_TIMESTAMP" |
void | FunctionsReturningNumerics ::= "LENGTH" "(" StringPrimary ")" | "LOCATE" "(" StringPrimary "," StringPrimary ["," SimpleArithmeticExpression]")" | "ABS" "(" SimpleArithmeticExpression ")" | "SQRT" "(" SimpleArithmeticExpression ")" | "MOD" "(" SimpleArithmeticExpression "," SimpleArithmeticExpression ")" | "SIZE" "(" CollectionValuedPathExpression ")" |
void | FunctionsReturningStrings ::= "CONCAT" "(" StringPrimary "," StringPrimary ")" | "SUBSTRING" "(" StringPrimary "," SimpleArithmeticExpression "," SimpleArithmeticExpression ")" | "TRIM" "(" [["LEADING" | "TRAILING" | "BOTH"] [char] "FROM"] StringPrimary ")" | "LOWER" "(" StringPrimary ")" | "UPPER" "(" StringPrimary ")" |
\Doctrine\ORM\Query\AST\GroupByClause | GroupByClause ::= "GROUP" "BY" GroupByItem {"," GroupByItem} |
string | GroupByItem ::= IdentificationVariable | SingleValuedPathExpression |
\Doctrine\ORM\Query\AST\HavingClause | HavingClause ::= "HAVING" ConditionalExpression |
string | IdentificationVariable ::= identifier |
\Doctrine\ORM\Query\AST\IdentificationVariableDeclaration | IdentificationVariableDeclaration() IdentificationVariableDeclaration ::= RangeVariableDeclaration [IndexBy] {JoinVariableDeclaration} |
\Doctrine\ORM\Query\AST\InExpression | InExpression ::= StateFieldPathExpression ["NOT"] "IN" "(" (InParameter {"," InParameter}* | Subselect) ")" |
string | InParameter ::= Literal | InputParameter |
Doctrine\ORM\Query\AST\IndexBy | IndexBy() IndexBy ::= "INDEX" "BY" SimpleStateFieldPathExpression |
\Doctrine\ORM\Query\AST\InputParameter | InputParameter ::= PositionalParameter | NamedParameter |
Doctrine\ORM\Query\AST\Join | Join() Join ::= ["LEFT" ["OUTER"] | "INNER"] "JOIN" JoinAssociationPathExpression ["AS"] AliasIdentificationVariable ["WITH" ConditionalExpression] |
\Doctrine\ORM\Query\AST\JoinAssociationPathExpression | JoinAssociationPathExpression() JoinAssociationPathExpression ::= IdentificationVariable "." (CollectionValuedAssociationField | SingleValuedAssociationField) |
\Doctrine\ORM\Query\AST\JoinVariableDeclaration | JoinVariableDeclaration ::= Join [IndexBy] |
\Doctrine\ORM\Query\AST\LikeExpression | LikeExpression ::= StringExpression ["NOT"] "LIKE" (string | input_parameter) ["ESCAPE" char] |
string | Literal() Literal ::= string | char | integer | float | boolean |
void | NewValue() NewValue ::= SimpleArithmeticExpression | StringPrimary | DatetimePrimary | BooleanPrimary | EnumPrimary | SimpleEntityExpression | "NULL"NOTE: Since it is not possible to correctly recognize individual types, here is the full grammar that needs to be supported:NewValue ::= SimpleArithmeticExpression | "NULL"SimpleArithmeticExpression covers all *Primary grammar rules and also SimplEntityExpression |
\Doctrine\ORM\Query\AST\NullComparisonExpression | NullComparisonExpression ::= (SingleValuedPathExpression | InputParameter) "IS" ["NOT"] "NULL" |
\Doctrine\ORM\Query\AST\OrderByClause | OrderByClause ::= "ORDER" "BY" OrderByItem {"," OrderByItem} |
\Doctrine\ORM\Query\AST\OrderByItem | OrderByItem ::= (ResultVariable | StateFieldPathExpression) ["ASC" | "DESC"] |
array | PartialObjectExpression ::= "PARTIAL" IdentificationVariable "." PartialFieldSet PartialFieldSet ::= "{" SimpleStateField {"," SimpleStateField}* "}" |
\Doctrine\ORM\Query\AST\PathExpression | PathExpression(integer expectedTypes) Parses an arbitrary path expression and defers semantical validation based on expected types. |
\Doctrine\ORM\Query\AST\QuantifiedExpression | QuantifiedExpression ::= ("ALL" | "ANY" | "SOME") "(" Subselect ")" |
\Doctrine\ORM\Query\AST\SelectStatement | QueryLanguage ::= SelectStatement | UpdateStatement | DeleteStatement |
Doctrine\ORM\Query\AST\RangeVariableDeclaration | RangeVariableDeclaration ::= AbstractSchemaName ["AS"] AliasIdentificationVariable |
string | ResultVariable ::= identifier |
mixed | ScalarExpression ::= SimpleArithmeticExpression | StringPrimary | DateTimePrimary | StateFieldPathExpression | BooleanPrimary | CaseExpression | EntityTypeExpression |
\Doctrine\ORM\Query\AST\SelectClause | SelectClause ::= "SELECT" ["DISTINCT"] SelectExpression {"," SelectExpression} |
Doctrine\ORM\Query\AST\SelectExpression | SelectExpression ::= IdentificationVariable | StateFieldPathExpression | (AggregateExpression | "(" Subselect ")" | ScalarExpression) [["AS"] AliasResultVariable] |
\Doctrine\ORM\Query\AST\SelectStatement | SelectStatement ::= SelectClause FromClause [WhereClause] [GroupByClause] [HavingClause] [OrderByClause] |
\Doctrine\ORM\Query\AST\SimpleArithmeticExpression | SimpleArithmeticExpression ::= ArithmeticTerm {("+" | "-") ArithmeticTerm} |
void | SimpleConditionalExpression ::= ComparisonExpression | BetweenExpression | LikeExpression | InExpression | NullComparisonExpression | ExistsExpression | EmptyCollectionComparisonExpression | CollectionMemberExpression |
string | SimpleEntityExpression ::= IdentificationVariable | InputParameter |
\Doctrine\ORM\Query\AST\SimpleSelectClause | SimpleSelectClause ::= "SELECT" ["DISTINCT"] SimpleSelectExpression |
\Doctrine\ORM\Query\AST\SimpleSelectExpression | SimpleSelectExpression ::= StateFieldPathExpression | IdentificationVariable | (AggregateExpression [["AS"] AliasResultVariable]) |
\Doctrine\ORM\Query\AST\PathExpression | SimpleStateFieldPathExpression() SimpleStateFieldPathExpression ::= IdentificationVariable "." StateField |
\Doctrine\ORM\Query\AST\PathExpression | SingleValuedAssociationPathExpression() SingleValuedAssociationPathExpression ::= IdentificationVariable "." {SingleValuedAssociationField "."}* SingleValuedAssociationField |
\Doctrine\ORM\Query\AST\PathExpression | SingleValuedPathExpression ::= StateFieldPathExpression | SingleValuedAssociationPathExpression |
\Doctrine\ORM\Query\AST\PathExpression | StateFieldPathExpression ::= SimpleStateFieldPathExpression | SimpleStateFieldAssociationPathExpression |
\Doctrine\ORM\Query\AST\StringPrimary | StringExpression ::= StringPrimary | "(" Subselect ")" |
void | StringPrimary ::= StateFieldPathExpression | string | InputParameter | FunctionsReturningStrings | AggregateExpression |
\Doctrine\ORM\Query\AST\Subselect | Subselect ::= SimpleSelectClause SubselectFromClause [WhereClause] [GroupByClause] [HavingClause] [OrderByClause] |
\Doctrine\ORM\Query\AST\SubselectFromClause | SubselectFromClause ::= "FROM" SubselectIdentificationVariableDeclaration {"," SubselectIdentificationVariableDeclaration} |
\Doctrine\ORM\Query\AST\SubselectIdentificationVariableDeclaration | SubselectIdentificationVariableDeclaration() SubselectIdentificationVariableDeclaration ::= IdentificationVariableDeclaration | (AssociationPathExpression ["AS"] AliasIdentificationVariable) |
\Doctrine\ORM\Query\AST\UpdateClause | UpdateClause ::= "UPDATE" AbstractSchemaName ["AS"] AliasIdentificationVariable "SET" UpdateItem {"," UpdateItem} |
\Doctrine\ORM\Query\AST\UpdateItem | UpdateItem ::= IdentificationVariable "." {StateField | SingleValuedAssociationField} "=" NewValue |
\Doctrine\ORM\Query\AST\UpdateStatement | UpdateStatement ::= UpdateClause [WhereClause] |
\Doctrine\ORM\Query\AST\WhereClause | WhereClause ::= "WHERE" ConditionalExpression |
void | addCustomTreeWalker(string className) Adds a custom tree walker for modifying the AST. |
void | free(boolean deep, integer position) Free this parser enabling it to be reused |
\Doctrine\ORM\Query\AST\SelectStatement | getAST() Parse and build AST for the given Query. |
EntityManager | Gets the EntityManager used by the parser. |
Doctrine\ORM\Query\Lexer | getLexer() Gets the lexer used by the parser. |
Doctrine\ORM\Query\ParserResult | Gets the ParserResult that is being filled with information during parsing. |
void | match(int|string token) Attempts to match the given token with the current lookahead token. |
ParserResult | parse() Parses a query string. |
void | semanticalError(string message, array token) Generates a new semantical error. |
void | setCustomOutputTreeWalker(string className) Sets a custom tree walker that produces output. |
void | syntaxError(string expected, array token) Generates a new syntax error. |
public Parser(Query query)
Creates a new query parser object.
public string AbstractSchemaName()
AbstractSchemaName ::= identifier
public \Doctrine\ORM\Query\AST\AggregateExpression AggregateExpression()
AggregateExpression ::= ("AVG" | "MAX" | "MIN" | "SUM") "(" ["DISTINCT"] StateFieldPathExpression ")" | "COUNT" "(" ["DISTINCT"] (IdentificationVariable | SingleValuedPathExpression) ")"
public string AliasIdentificationVariable()
AliasIdentificationVariable = identifier
public string AliasResultVariable()
AliasResultVariable ::= identifier
public \Doctrine\ORM\Query\AST\ArithmeticExpression ArithmeticExpression()
ArithmeticExpression ::= SimpleArithmeticExpression | "(" Subselect ")"
public \Doctrine\ORM\Query\AST\ArithmeticFactor ArithmeticFactor()
ArithmeticFactor ::= [("+" | "-")] ArithmeticPrimary
public void ArithmeticPrimary()
ArithmeticPrimary ::= SingleValuedPathExpression | Literal | "(" SimpleArithmeticExpression ")" | FunctionsReturningNumerics | AggregateExpression | FunctionsReturningStrings | FunctionsReturningDatetime | IdentificationVariable
public \Doctrine\ORM\Query\AST\ArithmeticTerm ArithmeticTerm()
ArithmeticTerm ::= ArithmeticFactor {("*" | "/") ArithmeticFactor}
public \Doctrine\ORM\Query\AST\PathExpression AssociationPathExpression()
AssociationPathExpression ::= CollectionValuedPathExpression | SingleValuedAssociationPathExpression
public \Doctrine\ORM\Query\AST\BetweenExpression BetweenExpression()
BetweenExpression ::= ArithmeticExpression ["NOT"] "BETWEEN" ArithmeticExpression "AND" ArithmeticExpression
public void CaseExpression()
public \Doctrine\ORM\Query\AST\CollectionMemberExpression CollectionMemberExpression()
CollectionMemberExpression ::= EntityExpression ["NOT"] "MEMBER" ["OF"] CollectionValuedPathExpression
EntityExpression ::= SingleValuedAssociationPathExpression | SimpleEntityExpression SimpleEntityExpression ::= IdentificationVariable | InputParameter
public \Doctrine\ORM\Query\AST\PathExpression CollectionValuedPathExpression()
CollectionValuedPathExpression ::= IdentificationVariable "." {SingleValuedAssociationField "."}* CollectionValuedAssociationField
public \Doctrine\ORM\Query\AST\ComparisonExpression ComparisonExpression()
ComparisonExpression ::= ArithmeticExpression ComparisonOperator ( QuantifiedExpression | ArithmeticExpression )
public string ComparisonOperator()
ComparisonOperator ::= "=" | "<" | "<=" | "<>" | ">" | ">=" | "!="
public \Doctrine\ORM\Query\AST\ConditionalExpression ConditionalExpression()
ConditionalExpression ::= ConditionalTerm {"OR" ConditionalTerm}
public \Doctrine\ORM\Query\AST\ConditionalFactor ConditionalFactor()
ConditionalFactor ::= ["NOT"] ConditionalPrimary
public Doctrine\ORM\Query\AST\ConditionalPrimary ConditionalPrimary()
ConditionalPrimary ::= SimpleConditionalExpression | "(" ConditionalExpression ")"
public \Doctrine\ORM\Query\AST\ConditionalTerm ConditionalTerm()
ConditionalTerm ::= ConditionalFactor {"AND" ConditionalFactor}
public void CustomFunctionsReturningDatetime()
public void CustomFunctionsReturningNumerics()
public void CustomFunctionsReturningStrings()
public \Doctrine\ORM\Query\AST\DeleteClause DeleteClause()
DeleteClause ::= "DELETE" ["FROM"] AbstractSchemaName ["AS"] AliasIdentificationVariable
public \Doctrine\ORM\Query\AST\DeleteStatement DeleteStatement()
DeleteStatement ::= DeleteClause [WhereClause]
public \Doctrine\ORM\Query\AST\EmptyCollectionComparisonExpression EmptyCollectionComparisonExpression()
EmptyCollectionComparisonExpression ::= CollectionValuedPathExpression "IS" ["NOT"] "EMPTY"
public \Doctrine\ORM\Query\AST\SingleValuedAssociationPathExpression EntityExpression()
EntityExpression ::= SingleValuedAssociationPathExpression | SimpleEntityExpression
public \Doctrine\ORM\Query\AST\ExistsExpression ExistsExpression()
ExistsExpression ::= ["NOT"] "EXISTS" "(" Subselect ")"
public \Doctrine\ORM\Query\AST\FromClause FromClause()
FromClause ::= "FROM" IdentificationVariableDeclaration {"," IdentificationVariableDeclaration}
public void FunctionDeclaration()
FunctionDeclaration ::= FunctionsReturningStrings | FunctionsReturningNumerics | FunctionsReturningDatetime
public void FunctionsReturningDatetime()
FunctionsReturningDateTime ::= "CURRENT_DATE" | "CURRENT_TIME" | "CURRENT_TIMESTAMP"
public void FunctionsReturningNumerics()
FunctionsReturningNumerics ::= "LENGTH" "(" StringPrimary ")" | "LOCATE" "(" StringPrimary "," StringPrimary ["," SimpleArithmeticExpression]")" | "ABS" "(" SimpleArithmeticExpression ")" | "SQRT" "(" SimpleArithmeticExpression ")" | "MOD" "(" SimpleArithmeticExpression "," SimpleArithmeticExpression ")" | "SIZE" "(" CollectionValuedPathExpression ")"
public void FunctionsReturningStrings()
FunctionsReturningStrings ::= "CONCAT" "(" StringPrimary "," StringPrimary ")" | "SUBSTRING" "(" StringPrimary "," SimpleArithmeticExpression "," SimpleArithmeticExpression ")" | "TRIM" "(" [["LEADING" | "TRAILING" | "BOTH"] [char] "FROM"] StringPrimary ")" | "LOWER" "(" StringPrimary ")" | "UPPER" "(" StringPrimary ")"
public \Doctrine\ORM\Query\AST\GroupByClause GroupByClause()
GroupByClause ::= "GROUP" "BY" GroupByItem {"," GroupByItem}
public string GroupByItem()
GroupByItem ::= IdentificationVariable | SingleValuedPathExpression
public \Doctrine\ORM\Query\AST\HavingClause HavingClause()
HavingClause ::= "HAVING" ConditionalExpression
public string IdentificationVariable()
IdentificationVariable ::= identifier
public \Doctrine\ORM\Query\AST\IdentificationVariableDeclaration IdentificationVariableDeclaration()
IdentificationVariableDeclaration ::= RangeVariableDeclaration [IndexBy] {JoinVariableDeclaration}
public \Doctrine\ORM\Query\AST\InExpression InExpression()
InExpression ::= StateFieldPathExpression ["NOT"] "IN" "(" (InParameter {"," InParameter}* | Subselect) ")"
public string InParameter()
InParameter ::= Literal | InputParameter
public Doctrine\ORM\Query\AST\IndexBy IndexBy()
IndexBy ::= "INDEX" "BY" SimpleStateFieldPathExpression
public \Doctrine\ORM\Query\AST\InputParameter InputParameter()
InputParameter ::= PositionalParameter | NamedParameter
public Doctrine\ORM\Query\AST\Join Join()
Join ::= ["LEFT" ["OUTER"] | "INNER"] "JOIN" JoinAssociationPathExpression ["AS"] AliasIdentificationVariable ["WITH" ConditionalExpression]
public \Doctrine\ORM\Query\AST\JoinAssociationPathExpression JoinAssociationPathExpression()
JoinAssociationPathExpression ::= IdentificationVariable "." (CollectionValuedAssociationField | SingleValuedAssociationField)
public \Doctrine\ORM\Query\AST\JoinVariableDeclaration JoinVariableDeclaration()
JoinVariableDeclaration ::= Join [IndexBy]
public \Doctrine\ORM\Query\AST\LikeExpression LikeExpression()
LikeExpression ::= StringExpression ["NOT"] "LIKE" (string | input_parameter) ["ESCAPE" char]
public string Literal()
Literal ::= string | char | integer | float | boolean
public void NewValue()
NewValue ::= SimpleArithmeticExpression | StringPrimary | DatetimePrimary | BooleanPrimary | EnumPrimary | SimpleEntityExpression | "NULL"
NOTE: Since it is not possible to correctly recognize individual types, here is the full grammar that needs to be supported:
NewValue ::= SimpleArithmeticExpression | "NULL"
SimpleArithmeticExpression covers all *Primary grammar rules and also SimplEntityExpression
public \Doctrine\ORM\Query\AST\NullComparisonExpression NullComparisonExpression()
NullComparisonExpression ::= (SingleValuedPathExpression | InputParameter) "IS" ["NOT"] "NULL"
public \Doctrine\ORM\Query\AST\OrderByClause OrderByClause()
OrderByClause ::= "ORDER" "BY" OrderByItem {"," OrderByItem}
public \Doctrine\ORM\Query\AST\OrderByItem OrderByItem()
OrderByItem ::= (ResultVariable | StateFieldPathExpression) ["ASC" | "DESC"]
public array PartialObjectExpression()
PartialObjectExpression ::= "PARTIAL" IdentificationVariable "." PartialFieldSet PartialFieldSet ::= "{" SimpleStateField {"," SimpleStateField}* "}"
public \Doctrine\ORM\Query\AST\PathExpression PathExpression(integer expectedTypes)
Parses an arbitrary path expression and defers semantical validation based on expected types.
PathExpression ::= IdentificationVariable {"." identifier}* "." identifier
public \Doctrine\ORM\Query\AST\QuantifiedExpression QuantifiedExpression()
QuantifiedExpression ::= ("ALL" | "ANY" | "SOME") "(" Subselect ")"
public \Doctrine\ORM\Query\AST\SelectStatement QueryLanguage()
QueryLanguage ::= SelectStatement | UpdateStatement | DeleteStatement
public Doctrine\ORM\Query\AST\RangeVariableDeclaration RangeVariableDeclaration()
RangeVariableDeclaration ::= AbstractSchemaName ["AS"] AliasIdentificationVariable
public string ResultVariable()
ResultVariable ::= identifier
public mixed ScalarExpression()
ScalarExpression ::= SimpleArithmeticExpression | StringPrimary | DateTimePrimary | StateFieldPathExpression | BooleanPrimary | CaseExpression | EntityTypeExpression
public \Doctrine\ORM\Query\AST\SelectClause SelectClause()
SelectClause ::= "SELECT" ["DISTINCT"] SelectExpression {"," SelectExpression}
public Doctrine\ORM\Query\AST\SelectExpression SelectExpression()
SelectExpression ::= IdentificationVariable | StateFieldPathExpression | (AggregateExpression | "(" Subselect ")" | ScalarExpression) [["AS"] AliasResultVariable]
public \Doctrine\ORM\Query\AST\SelectStatement SelectStatement()
SelectStatement ::= SelectClause FromClause [WhereClause] [GroupByClause] [HavingClause] [OrderByClause]
public \Doctrine\ORM\Query\AST\SimpleArithmeticExpression SimpleArithmeticExpression()
SimpleArithmeticExpression ::= ArithmeticTerm {("+" | "-") ArithmeticTerm}
public void SimpleConditionalExpression()
SimpleConditionalExpression ::= ComparisonExpression | BetweenExpression | LikeExpression | InExpression | NullComparisonExpression | ExistsExpression | EmptyCollectionComparisonExpression | CollectionMemberExpression
public string SimpleEntityExpression()
SimpleEntityExpression ::= IdentificationVariable | InputParameter
public \Doctrine\ORM\Query\AST\SimpleSelectClause SimpleSelectClause()
SimpleSelectClause ::= "SELECT" ["DISTINCT"] SimpleSelectExpression
public \Doctrine\ORM\Query\AST\SimpleSelectExpression SimpleSelectExpression()
SimpleSelectExpression ::= StateFieldPathExpression | IdentificationVariable | (AggregateExpression [["AS"] AliasResultVariable])
public \Doctrine\ORM\Query\AST\PathExpression SimpleStateFieldPathExpression()
SimpleStateFieldPathExpression ::= IdentificationVariable "." StateField
public \Doctrine\ORM\Query\AST\PathExpression SingleValuedAssociationPathExpression()
SingleValuedAssociationPathExpression ::= IdentificationVariable "." {SingleValuedAssociationField "."}* SingleValuedAssociationField
public \Doctrine\ORM\Query\AST\PathExpression SingleValuedPathExpression()
SingleValuedPathExpression ::= StateFieldPathExpression | SingleValuedAssociationPathExpression
public \Doctrine\ORM\Query\AST\PathExpression StateFieldPathExpression()
StateFieldPathExpression ::= SimpleStateFieldPathExpression | SimpleStateFieldAssociationPathExpression
public \Doctrine\ORM\Query\AST\StringPrimary StringExpression()
StringExpression ::= StringPrimary | "(" Subselect ")"
public void StringPrimary()
StringPrimary ::= StateFieldPathExpression | string | InputParameter | FunctionsReturningStrings | AggregateExpression
public \Doctrine\ORM\Query\AST\Subselect Subselect()
Subselect ::= SimpleSelectClause SubselectFromClause [WhereClause] [GroupByClause] [HavingClause] [OrderByClause]
public \Doctrine\ORM\Query\AST\SubselectFromClause SubselectFromClause()
SubselectFromClause ::= "FROM" SubselectIdentificationVariableDeclaration {"," SubselectIdentificationVariableDeclaration}
public \Doctrine\ORM\Query\AST\SubselectIdentificationVariableDeclaration SubselectIdentificationVariableDeclaration()
SubselectIdentificationVariableDeclaration ::= IdentificationVariableDeclaration | (AssociationPathExpression ["AS"] AliasIdentificationVariable)
public \Doctrine\ORM\Query\AST\UpdateClause UpdateClause()
UpdateClause ::= "UPDATE" AbstractSchemaName ["AS"] AliasIdentificationVariable "SET" UpdateItem {"," UpdateItem}
public \Doctrine\ORM\Query\AST\UpdateItem UpdateItem()
UpdateItem ::= IdentificationVariable "." {StateField | SingleValuedAssociationField} "=" NewValue
public \Doctrine\ORM\Query\AST\UpdateStatement UpdateStatement()
UpdateStatement ::= UpdateClause [WhereClause]
public \Doctrine\ORM\Query\AST\WhereClause WhereClause()
WhereClause ::= "WHERE" ConditionalExpression
public void addCustomTreeWalker(string className)
Adds a custom tree walker for modifying the AST.
public void free(boolean deep, integer position)
Free this parser enabling it to be reused
public \Doctrine\ORM\Query\AST\SelectStatement getAST()
Parse and build AST for the given Query.
public EntityManager getEntityManager()
Gets the EntityManager used by the parser.
public Doctrine\ORM\Query\Lexer getLexer()
Gets the lexer used by the parser.
public Doctrine\ORM\Query\ParserResult getParserResult()
Gets the ParserResult that is being filled with information during parsing.
public void match(int|string token)
Attempts to match the given token with the current lookahead token.
If they match, updates the lookahead token; otherwise raises a syntax error.
public ParserResult parse()
Parses a query string.
public void semanticalError(string message, array token)
Generates a new semantical error.
public void setCustomOutputTreeWalker(string className)
Sets a custom tree walker that produces output. This tree walker will be run last over the AST, after any other walkers.
public void syntaxError(string expected, array token)
Generates a new syntax error.
An LL(*) recursive-descent parser for the context-free grammar of the Doctrine Query Language. Parses a DQL query, reports any errors in it, and generates an AST.