Documentation

TreeWalker

Interface for walkers of DQL ASTs (abstract syntax trees).

Tags
psalm-import-type

QueryComponent from Parser

Table of Contents

Methods

__construct()  : mixed
Initializes TreeWalker with important information about the ASTs to be walked.
getExecutor()  : AbstractSqlExecutor
Gets an executor that can be used to execute the result of this walker.
getQueryComponents()  : array<string, array<string, mixed>>
Returns internal queryComponents array.
setQueryComponent()  : void
Sets or overrides a query component for a given dql alias.
walkAggregateExpression()  : void
Walks down an AggregateExpression AST node.
walkArithmeticExpression()  : void
Walks down an ArithmeticExpression AST node.
walkArithmeticFactor()  : void
Walks down an ArithmeticFactor that represents an AST node.
walkArithmeticTerm()  : void
Walks down an ArithmeticTerm AST node.
walkBetweenExpression()  : void
Walks down a BetweenExpression AST node.
walkCollectionMemberExpression()  : void
Walks down a CollectionMemberExpression AST node.
walkComparisonExpression()  : void
Walks down a ComparisonExpression AST node.
walkConditionalExpression()  : void
Walk down a ConditionalExpression AST node.
walkConditionalFactor()  : void
Walks down a ConditionalFactor AST node.
walkConditionalPrimary()  : void
Walks down a ConditionalPrimary AST node.
walkConditionalTerm()  : void
Walks down a ConditionalTerm AST node.
walkDeleteClause()  : void
Walks down a DeleteClause AST node.
walkDeleteStatement()  : void
Walks down a DeleteStatement AST node.
walkEmptyCollectionComparisonExpression()  : void
Walks down an EmptyCollectionComparisonExpression AST node.
walkExistsExpression()  : void
Walks down an ExistsExpression AST node.
walkFromClause()  : void
Walks down a FromClause AST node.
walkFunction()  : void
Walks down a FunctionNode AST node.
walkGroupByClause()  : void
Walks down a GroupByClause AST node.
walkGroupByItem()  : void
Walks down a GroupByItem AST node.
walkHavingClause()  : void
Walks down a HavingClause AST node.
walkInExpression()  : void
Walks down an InExpression AST node.
walkInputParameter()  : void
Walks down an InputParameter AST node.
walkInstanceOfExpression()  : void
Walks down an InstanceOfExpression AST node.
walkJoin()  : void
Walks down a Join AST node.
walkLikeExpression()  : void
Walks down a LikeExpression AST node.
walkLiteral()  : void
Walks down a literal that represents an AST node.
walkNullComparisonExpression()  : void
Walks down a NullComparisonExpression AST node.
walkOrderByClause()  : void
Walks down an OrderByClause AST node.
walkOrderByItem()  : void
Walks down an OrderByItem AST node, thereby generating the appropriate SQL.
walkPathExpression()  : void
Walks down a PathExpression AST node.
walkQuantifiedExpression()  : void
Walks down a QuantifiedExpression AST node.
walkResultVariable()  : void
Walks down a ResultVariable that represents an AST node.
walkSelectClause()  : void
Walks down a SelectClause AST node.
walkSelectExpression()  : void
Walks down a SelectExpression AST node.
walkSelectStatement()  : void
Walks down a SelectStatement AST node.
walkSimpleArithmeticExpression()  : void
Walks down an SimpleArithmeticExpression AST node.
walkSimpleSelectClause()  : void
Walks down a SimpleSelectClause AST node.
walkSimpleSelectExpression()  : void
Walks down a SimpleSelectExpression AST node.
walkStateFieldPathExpression()  : void
Walks down a StateFieldPathExpression AST node.
walkStringPrimary()  : void
Walks down a StringPrimary that represents an AST node.
walkSubselect()  : void
Walks down a Subselect AST node.
walkSubselectFromClause()  : void
Walks down a SubselectFromClause AST node.
walkUpdateClause()  : void
Walks down an UpdateClause AST node.
walkUpdateItem()  : void
Walks down an UpdateItem AST node.
walkUpdateStatement()  : void
Walks down an UpdateStatement AST node.
walkWhereClause()  : void
Walks down a WhereClause AST node.

Methods

__construct()

Initializes TreeWalker with important information about the ASTs to be walked.

public __construct(AbstractQuery $query, ParserResult $parserResult, array<string|int, mixed> $queryComponents) : mixed
Parameters
$query : AbstractQuery

The parsed Query.

$parserResult : ParserResult

The result of the parsing process.

$queryComponents : array<string|int, mixed>

The query components (symbol table).

Tags
psalm-param

array<string, QueryComponent> $queryComponents The query components (symbol table).

getQueryComponents()

Returns internal queryComponents array.

public getQueryComponents() : array<string, array<string, mixed>>
Tags
psalm-return

array<string, QueryComponent>

Return values
array<string, array<string, mixed>>

setQueryComponent()

Sets or overrides a query component for a given dql alias.

public setQueryComponent(string $dqlAlias, array<string, mixed> $queryComponent) : void
Parameters
$dqlAlias : string

The DQL alias.

$queryComponent : array<string, mixed>
Tags
deprecated

This method will be removed from the interface in 3.0.

psalm-param

QueryComponent $queryComponent

walkAggregateExpression()

Walks down an AggregateExpression AST node.

public walkAggregateExpression(AggregateExpression $aggExpression) : void
Parameters
$aggExpression : AggregateExpression
Tags
deprecated

This method will be removed from the interface in 3.0.

walkArithmeticExpression()

Walks down an ArithmeticExpression AST node.

public walkArithmeticExpression(ArithmeticExpression $arithmeticExpr) : void
Parameters
$arithmeticExpr : ArithmeticExpression
Tags
deprecated

This method will be removed from the interface in 3.0.

walkArithmeticFactor()

Walks down an ArithmeticFactor that represents an AST node.

public walkArithmeticFactor(mixed $factor) : void
Parameters
$factor : mixed
Tags
deprecated

This method will be removed from the interface in 3.0.

walkArithmeticTerm()

Walks down an ArithmeticTerm AST node.

public walkArithmeticTerm(mixed $term) : void
Parameters
$term : mixed
Tags
deprecated

This method will be removed from the interface in 3.0.

walkBetweenExpression()

Walks down a BetweenExpression AST node.

public walkBetweenExpression(BetweenExpression $betweenExpr) : void
Parameters
$betweenExpr : BetweenExpression
Tags
deprecated

This method will be removed from the interface in 3.0.

walkComparisonExpression()

Walks down a ComparisonExpression AST node.

public walkComparisonExpression(ComparisonExpression $compExpr) : void
Parameters
$compExpr : ComparisonExpression
Tags
deprecated

This method will be removed from the interface in 3.0.

walkConditionalExpression()

Walk down a ConditionalExpression AST node.

public walkConditionalExpression(ConditionalExpression $condExpr) : void
Parameters
$condExpr : ConditionalExpression
Tags
deprecated

This method will be removed from the interface in 3.0.

walkConditionalFactor()

Walks down a ConditionalFactor AST node.

public walkConditionalFactor(ConditionalFactor $factor) : void
Parameters
$factor : ConditionalFactor
Tags
deprecated

This method will be removed from the interface in 3.0.

walkConditionalPrimary()

Walks down a ConditionalPrimary AST node.

public walkConditionalPrimary(ConditionalPrimary $primary) : void
Parameters
$primary : ConditionalPrimary
Tags
deprecated

This method will be removed from the interface in 3.0.

walkConditionalTerm()

Walks down a ConditionalTerm AST node.

public walkConditionalTerm(ConditionalTerm $condTerm) : void
Parameters
$condTerm : ConditionalTerm
Tags
deprecated

This method will be removed from the interface in 3.0.

walkDeleteClause()

Walks down a DeleteClause AST node.

public walkDeleteClause(DeleteClause $deleteClause) : void
Parameters
$deleteClause : DeleteClause
Tags
deprecated

This method will be removed from the interface in 3.0.

walkExistsExpression()

Walks down an ExistsExpression AST node.

public walkExistsExpression(ExistsExpression $existsExpr) : void
Parameters
$existsExpr : ExistsExpression
Tags
deprecated

This method will be removed from the interface in 3.0.

walkFromClause()

Walks down a FromClause AST node.

public walkFromClause(FromClause $fromClause) : void
Parameters
$fromClause : FromClause
Tags
deprecated

This method will be removed from the interface in 3.0.

walkFunction()

Walks down a FunctionNode AST node.

public walkFunction(FunctionNode $function) : void
Parameters
$function : FunctionNode
Tags
deprecated

This method will be removed from the interface in 3.0.

walkGroupByClause()

Walks down a GroupByClause AST node.

public walkGroupByClause(GroupByClause $groupByClause) : void
Parameters
$groupByClause : GroupByClause
Tags
deprecated

This method will be removed from the interface in 3.0.

walkGroupByItem()

Walks down a GroupByItem AST node.

public walkGroupByItem(PathExpression|string $groupByItem) : void
Parameters
$groupByItem : PathExpression|string
Tags
deprecated

This method will be removed from the interface in 3.0.

walkHavingClause()

Walks down a HavingClause AST node.

public walkHavingClause(HavingClause $havingClause) : void
Parameters
$havingClause : HavingClause
Tags
deprecated

This method will be removed from the interface in 3.0.

walkInExpression()

Walks down an InExpression AST node.

public walkInExpression(InExpression $inExpr) : void
Parameters
$inExpr : InExpression
Tags
deprecated

This method will be removed from the interface in 3.0.

walkInputParameter()

Walks down an InputParameter AST node.

public walkInputParameter(InputParameter $inputParam) : void
Parameters
$inputParam : InputParameter
Tags
deprecated

This method will be removed from the interface in 3.0.

walkInstanceOfExpression()

Walks down an InstanceOfExpression AST node.

public walkInstanceOfExpression(InstanceOfExpression $instanceOfExpr) : void
Parameters
$instanceOfExpr : InstanceOfExpression
Tags
deprecated

This method will be removed from the interface in 3.0.

walkJoin()

Walks down a Join AST node.

public walkJoin(Join $join) : void
Parameters
$join : Join
Tags
deprecated

This method will be removed from the interface in 3.0.

walkLikeExpression()

Walks down a LikeExpression AST node.

public walkLikeExpression(LikeExpression $likeExpr) : void
Parameters
$likeExpr : LikeExpression
Tags
deprecated

This method will be removed from the interface in 3.0.

walkLiteral()

Walks down a literal that represents an AST node.

public walkLiteral(Literal $literal) : void
Parameters
$literal : Literal
Tags
deprecated

This method will be removed from the interface in 3.0.

walkOrderByClause()

Walks down an OrderByClause AST node.

public walkOrderByClause(OrderByClause $orderByClause) : void
Parameters
$orderByClause : OrderByClause
Tags
deprecated

This method will be removed from the interface in 3.0.

walkOrderByItem()

Walks down an OrderByItem AST node, thereby generating the appropriate SQL.

public walkOrderByItem(OrderByItem $orderByItem) : void
Parameters
$orderByItem : OrderByItem
Tags
deprecated

This method will be removed from the interface in 3.0.

walkPathExpression()

Walks down a PathExpression AST node.

public walkPathExpression(PathExpression $pathExpr) : void
Parameters
$pathExpr : PathExpression
Tags
deprecated

This method will be removed from the interface in 3.0.

walkQuantifiedExpression()

Walks down a QuantifiedExpression AST node.

public walkQuantifiedExpression(QuantifiedExpression $qExpr) : void
Parameters
$qExpr : QuantifiedExpression
Tags
deprecated

This method will be removed from the interface in 3.0.

walkResultVariable()

Walks down a ResultVariable that represents an AST node.

public walkResultVariable(string $resultVariable) : void
Parameters
$resultVariable : string
Tags
deprecated

This method will be removed from the interface in 3.0.

walkSelectClause()

Walks down a SelectClause AST node.

public walkSelectClause(SelectClause $selectClause) : void
Parameters
$selectClause : SelectClause
Tags
deprecated

This method will be removed from the interface in 3.0.

walkSelectExpression()

Walks down a SelectExpression AST node.

public walkSelectExpression(SelectExpression $selectExpression) : void
Parameters
$selectExpression : SelectExpression
Tags
deprecated

This method will be removed from the interface in 3.0.

walkSimpleArithmeticExpression()

Walks down an SimpleArithmeticExpression AST node.

public walkSimpleArithmeticExpression(SimpleArithmeticExpression $simpleArithmeticExpr) : void
Parameters
$simpleArithmeticExpr : SimpleArithmeticExpression
Tags
deprecated

This method will be removed from the interface in 3.0.

walkSimpleSelectClause()

Walks down a SimpleSelectClause AST node.

public walkSimpleSelectClause(SimpleSelectClause $simpleSelectClause) : void
Parameters
$simpleSelectClause : SimpleSelectClause
Tags
deprecated

This method will be removed from the interface in 3.0.

walkSimpleSelectExpression()

Walks down a SimpleSelectExpression AST node.

public walkSimpleSelectExpression(SimpleSelectExpression $simpleSelectExpression) : void
Parameters
$simpleSelectExpression : SimpleSelectExpression
Tags
deprecated

This method will be removed from the interface in 3.0.

walkStateFieldPathExpression()

Walks down a StateFieldPathExpression AST node.

public walkStateFieldPathExpression(PathExpression $stateFieldPathExpression) : void
Parameters
$stateFieldPathExpression : PathExpression
Tags
deprecated

This method will be removed from the interface in 3.0.

walkStringPrimary()

Walks down a StringPrimary that represents an AST node.

public walkStringPrimary(mixed $stringPrimary) : void
Parameters
$stringPrimary : mixed
Tags
deprecated

This method will be removed from the interface in 3.0.

walkSubselect()

Walks down a Subselect AST node.

public walkSubselect(Subselect $subselect) : void
Parameters
$subselect : Subselect
Tags
deprecated

This method will be removed from the interface in 3.0.

walkSubselectFromClause()

Walks down a SubselectFromClause AST node.

public walkSubselectFromClause(SubselectFromClause $subselectFromClause) : void
Parameters
$subselectFromClause : SubselectFromClause
Tags
deprecated

This method will be removed from the interface in 3.0.

walkUpdateClause()

Walks down an UpdateClause AST node.

public walkUpdateClause(UpdateClause $updateClause) : void
Parameters
$updateClause : UpdateClause
Tags
deprecated

This method will be removed from the interface in 3.0.

walkUpdateItem()

Walks down an UpdateItem AST node.

public walkUpdateItem(UpdateItem $updateItem) : void
Parameters
$updateItem : UpdateItem
Tags
deprecated

This method will be removed from the interface in 3.0.

walkWhereClause()

Walks down a WhereClause AST node.

public walkWhereClause(WhereClause $whereClause) : void

WhereClause or not, the appropriate discriminator sql is added.

Parameters
$whereClause : WhereClause
Tags
deprecated

This method will be removed from the interface in 3.0.


        
On this page

Search results