| Methods |
public
|
__construct(Query $query, ParserResult $parserResult, array<string, QueryComponent> $queryComponents)
Initializes TreeWalker with important information about the ASTs to be walked.
Initializes TreeWalker with important information about the ASTs to be walked.
Parameters
| $query |
The parsed Query.
|
| $parserResult |
The result of the parsing process.
|
| $queryComponents |
The query components (symbol table).
|
Implements
|
#
|
public
|
getQuery(): Query
Gets the Query instance used by the walker.
Gets the Query instance used by the walker.
|
#
|
public
|
getConnection(): Connection
Gets the Connection used by the walker.
Gets the Connection used by the walker.
|
#
|
public
|
getEntityManager(): EntityManagerInterface
Gets the EntityManager used by the walker.
Gets the EntityManager used by the walker.
|
#
|
public
|
getQueryComponent(string $dqlAlias): mixed[]
Gets the information about a single query component.
Gets the information about a single query component.
Parameters
|
#
|
public
|
getMetadataForDqlAlias(string $dqlAlias): ClassMetadata
|
#
|
public
|
getQueryComponents(): array<string, QueryComponent>
Returns internal queryComponents array.
Returns internal queryComponents array.
Implements
|
#
|
public
|
setQueryComponent(string $dqlAlias, QueryComponent $queryComponent): void
Sets or overrides a query component for a given dql alias.
Sets or overrides a query component for a given dql alias.
Parameters
Implements
|
#
|
public
|
getExecutor(DeleteStatement|UpdateStatement|SelectStatement $AST): AbstractSqlExecutor
Gets an executor that can be used to execute the result of this walker.
Gets an executor that can be used to execute the result of this walker.
Implements
|
#
|
public
|
getSQLTableAlias(string $tableName, string $dqlAlias = ''): string
Generates a unique, short SQL table alias.
Generates a unique, short SQL table alias.
Parameters
| $tableName |
Table name
|
| $dqlAlias |
The DQL alias.
|
Returns
|
#
|
public
|
setSQLTableAlias(string $tableName, string $alias, string $dqlAlias = ''): string
Forces the SqlWalker to use a specific alias for a table name, rather than
generating an alias on its own.
Forces the SqlWalker to use a specific alias for a table name, rather than
generating an alias on its own.
|
#
|
public
|
getSQLColumnAlias(string $columnName): string
Gets an SQL column alias for a column name.
Gets an SQL column alias for a column name.
|
#
|
private
|
generateClassTableInheritanceJoins(ClassMetadata $class, string $dqlAlias): string
Generates the SQL JOINs that are necessary for Class Table Inheritance
for the given class.
Generates the SQL JOINs that are necessary for Class Table Inheritance
for the given class.
Parameters
| $class |
The class for which to generate the joins.
|
| $dqlAlias |
The DQL alias of the class.
|
Returns
|
#
|
private
|
generateOrderedCollectionOrderByItems(): string
|
#
|
private
|
generateDiscriminatorColumnConditionSQL(list<string> $dqlAliases): string
Generates a discriminator column SQL condition for the class with the given DQL alias.
Generates a discriminator column SQL condition for the class with the given DQL alias.
Parameters
| $dqlAliases |
List of root DQL aliases to inspect for discriminator restrictions.
|
|
#
|
private
|
generateFilterConditionSQL(ClassMetadata $targetEntity, string $targetTableAlias): string
Generates the filter SQL for a given entity and table alias.
Generates the filter SQL for a given entity and table alias.
Parameters
| $targetEntity |
Metadata of the target entity.
|
| $targetTableAlias |
The table alias of the joined/selected table.
|
Returns
The SQL query part to add to a query.
|
#
|
public
|
walkSelectStatement(SelectStatement $AST): string
Walks down a SelectStatement AST node, thereby generating the appropriate SQL.
Walks down a SelectStatement AST node, thereby generating the appropriate SQL.
Implements
|
#
|
public
|
walkUpdateStatement(UpdateStatement $AST): string
Walks down an UpdateStatement AST node, thereby generating the appropriate SQL.
Walks down an UpdateStatement AST node, thereby generating the appropriate SQL.
Implements
|
#
|
public
|
walkDeleteStatement(DeleteStatement $AST): string
Walks down a DeleteStatement AST node, thereby generating the appropriate SQL.
Walks down a DeleteStatement AST node, thereby generating the appropriate SQL.
Implements
|
#
|
public
|
walkEntityIdentificationVariable(string $identVariable): string
Walks down an IdentificationVariable AST node, thereby generating the appropriate SQL.
This one differs of -…
Walks down an IdentificationVariable AST node, thereby generating the appropriate SQL.
This one differs of ->walkIdentificationVariable() because it generates the entity identifiers.
|
#
|
public
|
walkIdentificationVariable(string $identificationVariable, string $fieldName = null): string
Walks down an IdentificationVariable (no AST node associated), thereby generating the SQL.
Walks down an IdentificationVariable (no AST node associated), thereby generating the SQL.
Returns
|
#
|
public
|
walkPathExpression(PathExpression $pathExpr): string
Walks down a PathExpression AST node, thereby generating the appropriate SQL.
Walks down a PathExpression AST node, thereby generating the appropriate SQL.
Implements
|
#
|
public
|
walkSelectClause(SelectClause $selectClause): string
Walks down a SelectClause AST node, thereby generating the appropriate SQL.
Walks down a SelectClause AST node, thereby generating the appropriate SQL.
Implements
|
#
|
public
|
walkFromClause(FromClause $fromClause): string
Walks down a FromClause AST node, thereby generating the appropriate SQL.
Walks down a FromClause AST node, thereby generating the appropriate SQL.
Implements
|
#
|
public
|
walkIdentificationVariableDeclaration(IdentificationVariableDeclaration $identificationVariableDecl): string
Walks down a IdentificationVariableDeclaration AST node, thereby generating the appropriate SQL.
Walks down a IdentificationVariableDeclaration AST node, thereby generating the appropriate SQL.
|
#
|
public
|
walkIndexBy(IndexBy $indexBy): void
Walks down a IndexBy AST node.
Walks down a IndexBy AST node.
|
#
|
public
|
walkRangeVariableDeclaration(RangeVariableDeclaration $rangeVariableDeclaration): string
Walks down a RangeVariableDeclaration AST node, thereby generating the appropriate SQL.
Walks down a RangeVariableDeclaration AST node, thereby generating the appropriate SQL.
|
#
|
private
|
generateRangeVariableDeclarationSQL(RangeVariableDeclaration $rangeVariableDeclaration, bool $buildNestedJoins): string
Generate appropriate SQL for RangeVariableDeclaration AST node
Generate appropriate SQL for RangeVariableDeclaration AST node
|
#
|
public
|
walkJoinAssociationDeclaration(
JoinAssociationDeclaration $joinAssociationDeclaration,
Join::JOIN_TYPE_* $joinType = Join::JOIN_TYPE_INNER,
ConditionalExpression $condExpr = null,
): string
Walks down a JoinAssociationDeclaration AST node, thereby generating the appropriate SQL.
Walks down a JoinAssociationDeclaration AST node, thereby generating the appropriate SQL.
Throws
|
#
|
public
|
walkFunction(FunctionNode $function): string
Walks down a FunctionNode AST node, thereby generating the appropriate SQL.
Walks down a FunctionNode AST node, thereby generating the appropriate SQL.
Implements
|
#
|
public
|
walkOrderByClause(OrderByClause $orderByClause): string
Walks down an OrderByClause AST node, thereby generating the appropriate SQL.
Walks down an OrderByClause AST node, thereby generating the appropriate SQL.
Implements
|
#
|
public
|
walkOrderByItem(OrderByItem $orderByItem): string
Walks down an OrderByItem AST node, thereby generating the appropriate SQL.
Walks down an OrderByItem AST node, thereby generating the appropriate SQL.
Implements
|
#
|
public
|
walkHavingClause(HavingClause $havingClause): string
Walks down a HavingClause AST node, thereby generating the appropriate SQL.
Walks down a HavingClause AST node, thereby generating the appropriate SQL.
Returns
Implements
|
#
|
public
|
walkJoin(Join $join): string
Walks down a Join AST node and creates the corresponding SQL.
Walks down a Join AST node and creates the corresponding SQL.
Implements
|
#
|
public
|
walkCoalesceExpression(CoalesceExpression $coalesceExpression): string
Walks down a CoalesceExpression AST node and generates the corresponding SQL.
Walks down a CoalesceExpression AST node and generates the corresponding SQL.
Returns
|
#
|
public
|
walkNullIfExpression(NullIfExpression $nullIfExpression): string
Walks down a NullIfExpression AST node and generates the corresponding SQL.
Walks down a NullIfExpression AST node and generates the corresponding SQL.
Returns
|
#
|
public
|
walkGeneralCaseExpression(GeneralCaseExpression $generalCaseExpression): string
Walks down a GeneralCaseExpression AST node and generates the corresponding SQL.
Walks down a GeneralCaseExpression AST node and generates the corresponding SQL.
Returns
|
#
|
public
|
walkSimpleCaseExpression(SimpleCaseExpression $simpleCaseExpression): string
Walks down a SimpleCaseExpression AST node and generates the corresponding SQL.
Walks down a SimpleCaseExpression AST node and generates the corresponding SQL.
Returns
|
#
|
public
|
walkSelectExpression(SelectExpression $selectExpression): string
Walks down a SelectExpression AST node and generates the corresponding SQL.
Walks down a SelectExpression AST node and generates the corresponding SQL.
Implements
|
#
|
public
|
walkQuantifiedExpression(QuantifiedExpression $qExpr): string
Walks down a QuantifiedExpression AST node, thereby generating the appropriate SQL.
Walks down a QuantifiedExpression AST node, thereby generating the appropriate SQL.
Implements
|
#
|
public
|
walkSubselect(Subselect $subselect): string
Walks down a Subselect AST node, thereby generating the appropriate SQL.
Walks down a Subselect AST node, thereby generating the appropriate SQL.
Implements
|
#
|
public
|
walkSubselectFromClause(SubselectFromClause $subselectFromClause): string
Walks down a SubselectFromClause AST node, thereby generating the appropriate SQL.
Walks down a SubselectFromClause AST node, thereby generating the appropriate SQL.
Implements
|
#
|
public
|
walkSimpleSelectClause(SimpleSelectClause $simpleSelectClause): string
Walks down a SimpleSelectClause AST node, thereby generating the appropriate SQL.
Walks down a SimpleSelectClause AST node, thereby generating the appropriate SQL.
Implements
|
#
|
public
|
walkParenthesisExpression(ParenthesisExpression $parenthesisExpression): string
|
#
|
public
|
walkNewObject(NewObjectExpression $newObjectExpression, string|null $newObjectResultAlias = null): string
|
#
|
public
|
walkSimpleSelectExpression(SimpleSelectExpression $simpleSelectExpression): string
Walks down a SimpleSelectExpression AST node, thereby generating the appropriate SQL.
Walks down a SimpleSelectExpression AST node, thereby generating the appropriate SQL.
Implements
|
#
|
public
|
walkAggregateExpression(AggregateExpression $aggExpression): string
Walks down an AggregateExpression AST node, thereby generating the appropriate SQL.
Walks down an AggregateExpression AST node, thereby generating the appropriate SQL.
Implements
|
#
|
public
|
walkGroupByClause(GroupByClause $groupByClause): string
Walks down a GroupByClause AST node, thereby generating the appropriate SQL.
Walks down a GroupByClause AST node, thereby generating the appropriate SQL.
Implements
|
#
|
public
|
walkGroupByItem(PathExpression|string $groupByItem): string
Walks down a GroupByItem AST node, thereby generating the appropriate SQL.
Walks down a GroupByItem AST node, thereby generating the appropriate SQL.
Implements
|
#
|
public
|
walkDeleteClause(DeleteClause $deleteClause): string
Walks down a DeleteClause AST node, thereby generating the appropriate SQL.
Walks down a DeleteClause AST node, thereby generating the appropriate SQL.
Implements
|
#
|
public
|
walkUpdateClause(UpdateClause $updateClause): string
Walks down an UpdateClause AST node, thereby generating the appropriate SQL.
Walks down an UpdateClause AST node, thereby generating the appropriate SQL.
Implements
|
#
|
public
|
walkUpdateItem(UpdateItem $updateItem): string
Walks down an UpdateItem AST node, thereby generating the appropriate SQL.
Walks down an UpdateItem AST node, thereby generating the appropriate SQL.
Implements
|
#
|
public
|
walkWhereClause(WhereClause $whereClause): string
Walks down a WhereClause AST node, thereby generating the appropriate SQL.
WhereClause or not, the appropriate…
Walks down a WhereClause AST node, thereby generating the appropriate SQL.
WhereClause or not, the appropriate discriminator sql is added.
Implements
|
#
|
public
|
walkConditionalExpression(ConditionalExpression $condExpr): string
Walk down a ConditionalExpression AST node, thereby generating the appropriate SQL.
Walk down a ConditionalExpression AST node, thereby generating the appropriate SQL.
Implements
|
#
|
public
|
walkConditionalTerm(ConditionalTerm $condTerm): string
Walks down a ConditionalTerm AST node, thereby generating the appropriate SQL.
Walks down a ConditionalTerm AST node, thereby generating the appropriate SQL.
Implements
|
#
|
public
|
walkConditionalFactor(ConditionalFactor $factor): string
Walks down a ConditionalFactor AST node, thereby generating the appropriate SQL.
Walks down a ConditionalFactor AST node, thereby generating the appropriate SQL.
Returns
Implements
|
#
|
public
|
walkConditionalPrimary(ConditionalPrimary $primary): string
Walks down a ConditionalPrimary AST node, thereby generating the appropriate SQL.
Walks down a ConditionalPrimary AST node, thereby generating the appropriate SQL.
Implements
|
#
|
public
|
walkExistsExpression(ExistsExpression $existsExpr): string
Walks down an ExistsExpression AST node, thereby generating the appropriate SQL.
Walks down an ExistsExpression AST node, thereby generating the appropriate SQL.
Implements
|
#
|
public
|
walkCollectionMemberExpression(CollectionMemberExpression $collMemberExpr): string
Walks down a CollectionMemberExpression AST node, thereby generating the appropriate SQL.
Walks down a CollectionMemberExpression AST node, thereby generating the appropriate SQL.
Implements
|
#
|
public
|
walkEmptyCollectionComparisonExpression(EmptyCollectionComparisonExpression $emptyCollCompExpr): string
Walks down an EmptyCollectionComparisonExpression AST node, thereby generating the appropriate SQL.
Walks down an EmptyCollectionComparisonExpression AST node, thereby generating the appropriate SQL.
Implements
|
#
|
public
|
walkNullComparisonExpression(NullComparisonExpression $nullCompExpr): string
Walks down a NullComparisonExpression AST node, thereby generating the appropriate SQL.
Walks down a NullComparisonExpression AST node, thereby generating the appropriate SQL.
Implements
|
#
|
public
|
walkInExpression(InExpression $inExpr): string
Walks down an InExpression AST node, thereby generating the appropriate SQL.
Walks down an InExpression AST node, thereby generating the appropriate SQL.
Deprecated
Use {@see walkInListExpression()} or {@see walkInSubselectExpression()} instead.
Implements
|
#
|
public
|
walkInListExpression(InListExpression $inExpr): string
Walks down an InExpression AST node, thereby generating the appropriate SQL.
Walks down an InExpression AST node, thereby generating the appropriate SQL.
|
#
|
public
|
walkInSubselectExpression(InSubselectExpression $inExpr): string
Walks down an InExpression AST node, thereby generating the appropriate SQL.
Walks down an InExpression AST node, thereby generating the appropriate SQL.
|
#
|
public
|
walkInstanceOfExpression(InstanceOfExpression $instanceOfExpr): string
Walks down an InstanceOfExpression AST node, thereby generating the appropriate SQL.
Walks down an InstanceOfExpression AST node, thereby generating the appropriate SQL.
Throws
Implements
|
#
|
public
|
walkInParameter(mixed $inParam): string
|
#
|
public
|
walkLiteral(Literal $literal): string
Walks down a literal that represents an AST node, thereby generating the appropriate SQL.
Walks down a literal that represents an AST node, thereby generating the appropriate SQL.
Implements
|
#
|
public
|
walkBetweenExpression(BetweenExpression $betweenExpr): string
Walks down a BetweenExpression AST node, thereby generating the appropriate SQL.
Walks down a BetweenExpression AST node, thereby generating the appropriate SQL.
Implements
|
#
|
public
|
walkLikeExpression(LikeExpression $likeExpr): string
Walks down a LikeExpression AST node, thereby generating the appropriate SQL.
Walks down a LikeExpression AST node, thereby generating the appropriate SQL.
Implements
|
#
|
public
|
walkStateFieldPathExpression(PathExpression $stateFieldPathExpression): string
Walks down a StateFieldPathExpression AST node, thereby generating the appropriate SQL.
Walks down a StateFieldPathExpression AST node, thereby generating the appropriate SQL.
Implements
|
#
|
public
|
walkComparisonExpression(ComparisonExpression $compExpr): string
Walks down a ComparisonExpression AST node, thereby generating the appropriate SQL.
Walks down a ComparisonExpression AST node, thereby generating the appropriate SQL.
Implements
|
#
|
public
|
walkInputParameter(InputParameter $inputParam): string
Walks down an InputParameter AST node, thereby generating the appropriate SQL.
Walks down an InputParameter AST node, thereby generating the appropriate SQL.
Implements
|
#
|
public
|
walkArithmeticExpression(ArithmeticExpression $arithmeticExpr): string
Walks down an ArithmeticExpression AST node, thereby generating the appropriate SQL.
Walks down an ArithmeticExpression AST node, thereby generating the appropriate SQL.
Implements
|
#
|
public
|
walkSimpleArithmeticExpression(SimpleArithmeticExpression $simpleArithmeticExpr): string
Walks down an SimpleArithmeticExpression AST node, thereby generating the appropriate SQL.
Walks down an SimpleArithmeticExpression AST node, thereby generating the appropriate SQL.
Implements
|
#
|
public
|
walkArithmeticTerm(mixed $term): string
Walks down an ArithmeticTerm AST node, thereby generating the appropriate SQL.
Walks down an ArithmeticTerm AST node, thereby generating the appropriate SQL.
Implements
|
#
|
public
|
walkArithmeticFactor(mixed $factor): string
Walks down an ArithmeticFactor that represents an AST node, thereby generating the appropriate SQL.
Walks down an ArithmeticFactor that represents an AST node, thereby generating the appropriate SQL.
Implements
|
#
|
public
|
walkArithmeticPrimary(mixed $primary): string
Walks down an ArithmeticPrimary that represents an AST node, thereby generating the appropriate SQL.
Walks down an ArithmeticPrimary that represents an AST node, thereby generating the appropriate SQL.
Returns
|
#
|
public
|
walkStringPrimary(mixed $stringPrimary): string
Walks down a StringPrimary that represents an AST node, thereby generating the appropriate SQL.
Walks down a StringPrimary that represents an AST node, thereby generating the appropriate SQL.
Implements
|
#
|
public
|
walkResultVariable(string $resultVariable): string
Walks down a ResultVariable that represents an AST node, thereby generating the appropriate SQL.
Walks down a ResultVariable that represents an AST node, thereby generating the appropriate SQL.
Implements
|
#
|
private
|
getChildDiscriminatorsFromClassMetadata(ClassMetadata $rootClass, InstanceOfExpression $instanceOfExpr): string
Returns
The list in parentheses of valid child discriminators from the given class
Throws
|
#
|