Documentation

CountOutputWalker extends SqlWalker
in package

Wraps the query in order to accurately count the root objects.

Given a DQL like SELECT u FROM User u it will generate an SQL query like: SELECT COUNT(*) (SELECT DISTINCT FROM (<original SQL>))

Works with composite keys but cannot deal with queries that have multiple root entities (e.g. SELECT f, b from Foo, Bar)

Note that the ORDER BY clause is not removed. Many SQL implementations (e.g. MySQL) are able to cache subqueries. By keeping the ORDER BY clause intact, the limitSubQuery that will most likely be executed next can be read from the native SQL cache.

Tags
psalm-import-type

QueryComponent from Parser

Table of Contents

Constants

HINT_DISTINCT  = 'doctrine.distinct'
HINT_PARTIAL  = 'doctrine.partial'
Used to mark a query as containing a PARTIAL expression, which needs to be known by SLC.

Properties

$aliasCounter  : int
Counter for generating unique column aliases.
$conn  : Connection
$em  : EntityManagerInterface
$newObjectCounter  : int
Counter for generating indexes.
$orderedColumnsMap  : array<string, string>
Map from Table-Alias + Column-Name to OrderBy-Direction.
$parserResult  : ParserResult
$platform  : AbstractPlatform
The database platform abstraction.
$query  : Query
$queryComponents  : mixed
Map of all components/classes that appear in the DQL query.
$quoteStrategy  : QuoteStrategy
The quote strategy.
$rootAliases  : mixed
The DQL alias of the root class of the currently traversed query.
$rsm  : ResultSetMapping
$scalarFields  : array<string, array<string, string>>
Map from DQL-Alias + Field-Name to SQL Column Alias.
$scalarResultAliasMap  : mixed
Map from result variable names to their SQL column alias names.
$scalarResultCounter  : int
Counter for generating unique scalar result.
$selectedClasses  : mixed
A list of classes that appear in non-scalar SelectExpressions.
$sqlParamIndex  : int
Counter for generating unique parameter indexes.
$tableAliasCounter  : int
Counter for generating unique table aliases.
$tableAliasMap  : array<string|int, mixed>
$useSqlTableAliases  : bool
Flag that indicates whether to generate SQL table aliases in the SQL.

Methods

__construct()  : mixed
Stores various parameters that are otherwise unavailable because Doctrine\ORM\Query\SqlWalker keeps everything private without accessors.
getConnection()  : Connection
Gets the Connection used by the walker.
getEntityManager()  : EntityManagerInterface
Gets the EntityManager used by the walker.
getExecutor()  : AbstractSqlExecutor
Gets an executor that can be used to execute the result of this walker.
getMetadataForDqlAlias()  : ClassMetadata
getQuery()  : Query
Gets the Query instance used by the walker.
getQueryComponent()  : array<string|int, mixed>
Gets the information about a single query component.
getQueryComponents()  : array<string, QueryComponent>
Returns internal queryComponents array.
getSQLColumnAlias()  : string
Gets an SQL column alias for a column name.
getSQLTableAlias()  : string
Generates a unique, short SQL table alias.
setQueryComponent()  : void
Sets or overrides a query component for a given dql alias.
setSQLTableAlias()  : string
Forces the SqlWalker to use a specific alias for a table name, rather than generating an alias on its own.
walkAggregateExpression()  : string
Walks down an AggregateExpression AST node, thereby generating the appropriate SQL.
walkArithmeticExpression()  : string
Walks down an ArithmeticExpression AST node, thereby generating the appropriate SQL.
walkArithmeticFactor()  : string
Walks down an ArithmeticFactor that represents an AST node, thereby generating the appropriate SQL.
walkArithmeticPrimary()  : string
Walks down an ArithmeticPrimary that represents an AST node, thereby generating the appropriate SQL.
walkArithmeticTerm()  : string
Walks down an ArithmeticTerm AST node, thereby generating the appropriate SQL.
walkBetweenExpression()  : string
Walks down a BetweenExpression AST node, thereby generating the appropriate SQL.
walkCoalesceExpression()  : string
Walks down a CoalesceExpression AST node and generates the corresponding SQL.
walkCollectionMemberExpression()  : string
Walks down a CollectionMemberExpression AST node, thereby generating the appropriate SQL.
walkComparisonExpression()  : string
Walks down a ComparisonExpression AST node, thereby generating the appropriate SQL.
walkConditionalExpression()  : string
Walk down a ConditionalExpression AST node, thereby generating the appropriate SQL.
walkConditionalFactor()  : string
Walks down a ConditionalFactor AST node, thereby generating the appropriate SQL.
walkConditionalPrimary()  : string
Walks down a ConditionalPrimary AST node, thereby generating the appropriate SQL.
walkConditionalTerm()  : string
Walks down a ConditionalTerm AST node, thereby generating the appropriate SQL.
walkDeleteClause()  : string
Walks down a DeleteClause AST node, thereby generating the appropriate SQL.
walkDeleteStatement()  : string
Walks down a DeleteStatement AST node, thereby generating the appropriate SQL.
walkEmptyCollectionComparisonExpression()  : string
Walks down an EmptyCollectionComparisonExpression AST node, thereby generating the appropriate SQL.
walkEntityIdentificationVariable()  : string
Walks down an IdentificationVariable AST node, thereby generating the appropriate SQL.
walkExistsExpression()  : string
Walks down an ExistsExpression AST node, thereby generating the appropriate SQL.
walkFromClause()  : string
Walks down a FromClause AST node, thereby generating the appropriate SQL.
walkFunction()  : string
Walks down a FunctionNode AST node, thereby generating the appropriate SQL.
walkGeneralCaseExpression()  : string
Walks down a GeneralCaseExpression AST node and generates the corresponding SQL.
walkGroupByClause()  : string
Walks down a GroupByClause AST node, thereby generating the appropriate SQL.
walkGroupByItem()  : string
Walks down a GroupByItem AST node, thereby generating the appropriate SQL.
walkHavingClause()  : string
Walks down a HavingClause AST node, thereby generating the appropriate SQL.
walkIdentificationVariable()  : string
Walks down an IdentificationVariable (no AST node associated), thereby generating the SQL.
walkIdentificationVariableDeclaration()  : string
Walks down a IdentificationVariableDeclaration AST node, thereby generating the appropriate SQL.
walkIndexBy()  : void
Walks down a IndexBy AST node.
walkInExpression()  : string
Walks down an InExpression AST node, thereby generating the appropriate SQL.
walkInListExpression()  : string
Walks down an InExpression AST node, thereby generating the appropriate SQL.
walkInParameter()  : string
walkInputParameter()  : string
Walks down an InputParameter AST node, thereby generating the appropriate SQL.
walkInstanceOfExpression()  : string
Walks down an InstanceOfExpression AST node, thereby generating the appropriate SQL.
walkInSubselectExpression()  : string
Walks down an InExpression AST node, thereby generating the appropriate SQL.
walkJoin()  : string
Walks down a Join AST node and creates the corresponding SQL.
walkJoinAssociationDeclaration()  : string
Walks down a JoinAssociationDeclaration AST node, thereby generating the appropriate SQL.
walkLikeExpression()  : string
Walks down a LikeExpression AST node, thereby generating the appropriate SQL.
walkLiteral()  : string
Walks down a literal that represents an AST node, thereby generating the appropriate SQL.
walkNewObject()  : string
walkNullComparisonExpression()  : string
Walks down a NullComparisonExpression AST node, thereby generating the appropriate SQL.
walkNullIfExpression()  : string
Walks down a NullIfExpression AST node and generates the corresponding SQL.
walkOrderByClause()  : string
Walks down an OrderByClause AST node, thereby generating the appropriate SQL.
walkOrderByItem()  : string
Walks down an OrderByItem AST node, thereby generating the appropriate SQL.
walkParenthesisExpression()  : string
walkPathExpression()  : string
Walks down a PathExpression AST node, thereby generating the appropriate SQL.
walkQuantifiedExpression()  : string
Walks down a QuantifiedExpression AST node, thereby generating the appropriate SQL.
walkRangeVariableDeclaration()  : string
Walks down a RangeVariableDeclaration AST node, thereby generating the appropriate SQL.
walkResultVariable()  : string
Walks down a ResultVariable that represents an AST node, thereby generating the appropriate SQL.
walkSelectClause()  : string
Walks down a SelectClause AST node, thereby generating the appropriate SQL.
walkSelectExpression()  : string
Walks down a SelectExpression AST node and generates the corresponding SQL.
walkSelectStatement()  : string
Walks down a SelectStatement AST node, thereby generating the appropriate SQL.
walkSimpleArithmeticExpression()  : string
Walks down an SimpleArithmeticExpression AST node, thereby generating the appropriate SQL.
walkSimpleCaseExpression()  : string
Walks down a SimpleCaseExpression AST node and generates the corresponding SQL.
walkSimpleSelectClause()  : string
Walks down a SimpleSelectClause AST node, thereby generating the appropriate SQL.
walkSimpleSelectExpression()  : string
Walks down a SimpleSelectExpression AST node, thereby generating the appropriate SQL.
walkStateFieldPathExpression()  : string
Walks down a StateFieldPathExpression AST node, thereby generating the appropriate SQL.
walkStringPrimary()  : string
Walks down a StringPrimary that represents an AST node, thereby generating the appropriate SQL.
walkSubselect()  : string
Walks down a Subselect AST node, thereby generating the appropriate SQL.
walkSubselectFromClause()  : string
Walks down a SubselectFromClause AST node, thereby generating the appropriate SQL.
walkUpdateClause()  : string
Walks down an UpdateClause AST node, thereby generating the appropriate SQL.
walkUpdateItem()  : string
Walks down an UpdateItem AST node, thereby generating the appropriate SQL.
walkUpdateStatement()  : string
Walks down an UpdateStatement AST node, thereby generating the appropriate SQL.
walkWhereClause()  : string
Walks down a WhereClause AST node, thereby generating the appropriate SQL.
generateClassTableInheritanceJoins()  : string
Generates the SQL JOINs that are necessary for Class Table Inheritance for the given class.
generateDiscriminatorColumnConditionSQL()  : string
Generates a discriminator column SQL condition for the class with the given DQL alias.
generateFilterConditionSQL()  : string
Generates the filter SQL for a given entity and table alias.
generateOrderedCollectionOrderByItems()  : string
generateRangeVariableDeclarationSQL()  : string
Generate appropriate SQL for RangeVariableDeclaration AST node
getChildDiscriminatorsFromClassMetadata()  : string

Constants

HINT_DISTINCT

public mixed HINT_DISTINCT = 'doctrine.distinct'

HINT_PARTIAL

Used to mark a query as containing a PARTIAL expression, which needs to be known by SLC.

public mixed HINT_PARTIAL = 'doctrine.partial'

Properties

$aliasCounter

Counter for generating unique column aliases.

private int $aliasCounter = 0

$newObjectCounter

Counter for generating indexes.

private int $newObjectCounter = 0

$orderedColumnsMap

Map from Table-Alias + Column-Name to OrderBy-Direction.

private array<string, string> $orderedColumnsMap = []

$queryComponents

Map of all components/classes that appear in the DQL query.

private mixed $queryComponents
Tags
psalm-var

array<string, QueryComponent>

$rootAliases

The DQL alias of the root class of the currently traversed query.

private mixed $rootAliases = []
Tags
psalm-var

list

$scalarFields

Map from DQL-Alias + Field-Name to SQL Column Alias.

private array<string, array<string, string>> $scalarFields = []

$scalarResultAliasMap

Map from result variable names to their SQL column alias names.

private mixed $scalarResultAliasMap = []
Tags
psalm-var

array<string|int, string|list>

$scalarResultCounter

Counter for generating unique scalar result.

private int $scalarResultCounter = 1

$selectedClasses

A list of classes that appear in non-scalar SelectExpressions.

private mixed $selectedClasses = []
Tags
psalm-var

array<string, array{class: ClassMetadata, dqlAlias: string, resultAlias: string|null}>

$sqlParamIndex

Counter for generating unique parameter indexes.

private int $sqlParamIndex = 0

$tableAliasCounter

Counter for generating unique table aliases.

private int $tableAliasCounter = 0

$tableAliasMap

private array<string|int, mixed> $tableAliasMap = []

$useSqlTableAliases

Flag that indicates whether to generate SQL table aliases in the SQL.

private bool $useSqlTableAliases = true

These should only be generated for SELECT queries, not for UPDATE/DELETE.

Methods

__construct()

Stores various parameters that are otherwise unavailable because Doctrine\ORM\Query\SqlWalker keeps everything private without accessors.

public __construct(Query $query, ParserResult $parserResult, array<string|int, mixed> $queryComponents) : mixed
Parameters
$query : Query
$parserResult : ParserResult
$queryComponents : array<string|int, mixed>
Tags
psalm-param

array<string, QueryComponent> $queryComponents

getConnection()

Gets the Connection used by the walker.

public getConnection() : Connection
Return values
Connection

getQuery()

Gets the Query instance used by the walker.

public getQuery() : Query
Return values
Query

getQueryComponent()

Gets the information about a single query component.

public getQueryComponent(string $dqlAlias) : array<string|int, mixed>
Parameters
$dqlAlias : string

The DQL alias.

Tags
psalm-return

QueryComponent

Return values
array<string|int, mixed>

getQueryComponents()

Returns internal queryComponents array.

public getQueryComponents() : array<string, QueryComponent>
Return values
array<string, QueryComponent>

getSQLColumnAlias()

Gets an SQL column alias for a column name.

public getSQLColumnAlias(string $columnName) : string
Parameters
$columnName : string
Return values
string

getSQLTableAlias()

Generates a unique, short SQL table alias.

public getSQLTableAlias(string $tableName[, string $dqlAlias = '' ]) : string
Parameters
$tableName : string

Table name

$dqlAlias : string = ''

The DQL alias.

Return values
string

Generated table alias.

setQueryComponent()

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

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

The DQL alias.

$queryComponent : array<string|int, mixed>
Tags
psalm-param

QueryComponent $queryComponent

not-deprecated

setSQLTableAlias()

Forces the SqlWalker to use a specific alias for a table name, rather than generating an alias on its own.

public setSQLTableAlias(string $tableName, string $alias[, string $dqlAlias = '' ]) : string
Parameters
$tableName : string
$alias : string
$dqlAlias : string = ''
Return values
string

walkAggregateExpression()

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

public walkAggregateExpression(AggregateExpression $aggExpression) : string
Parameters
$aggExpression : AggregateExpression
Tags
not-deprecated
Return values
string

walkArithmeticExpression()

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

public walkArithmeticExpression(ArithmeticExpression $arithmeticExpr) : string
Parameters
$arithmeticExpr : ArithmeticExpression
Tags
not-deprecated
Return values
string

walkArithmeticFactor()

Walks down an ArithmeticFactor that represents an AST node, thereby generating the appropriate SQL.

public walkArithmeticFactor(mixed $factor) : string
Parameters
$factor : mixed
Tags
not-deprecated
Return values
string

walkArithmeticPrimary()

Walks down an ArithmeticPrimary that represents an AST node, thereby generating the appropriate SQL.

public walkArithmeticPrimary(mixed $primary) : string
Parameters
$primary : mixed
Tags
not-deprecated
Return values
string

The SQL.

walkArithmeticTerm()

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

public walkArithmeticTerm(mixed $term) : string
Parameters
$term : mixed
Tags
not-deprecated
Return values
string

walkBetweenExpression()

Walks down a BetweenExpression AST node, thereby generating the appropriate SQL.

public walkBetweenExpression(BetweenExpression $betweenExpr) : string
Parameters
$betweenExpr : BetweenExpression
Tags
not-deprecated
Return values
string

walkCoalesceExpression()

Walks down a CoalesceExpression AST node and generates the corresponding SQL.

public walkCoalesceExpression(CoalesceExpression $coalesceExpression) : string
Parameters
$coalesceExpression : CoalesceExpression
Tags
not-deprecated
Return values
string

The SQL.

walkCollectionMemberExpression()

Walks down a CollectionMemberExpression AST node, thereby generating the appropriate SQL.

public walkCollectionMemberExpression(CollectionMemberExpression $collMemberExpr) : string
Parameters
$collMemberExpr : CollectionMemberExpression
Tags
not-deprecated
Return values
string

walkComparisonExpression()

Walks down a ComparisonExpression AST node, thereby generating the appropriate SQL.

public walkComparisonExpression(ComparisonExpression $compExpr) : string
Parameters
$compExpr : ComparisonExpression
Tags
not-deprecated
Return values
string

walkConditionalExpression()

Walk down a ConditionalExpression AST node, thereby generating the appropriate SQL.

public walkConditionalExpression(ConditionalExpression $condExpr) : string
Parameters
$condExpr : ConditionalExpression
Tags
not-deprecated
Return values
string

walkConditionalFactor()

Walks down a ConditionalFactor AST node, thereby generating the appropriate SQL.

public walkConditionalFactor(ConditionalFactor $factor) : string
Parameters
$factor : ConditionalFactor
Tags
not-deprecated
Return values
string

The SQL.

walkConditionalPrimary()

Walks down a ConditionalPrimary AST node, thereby generating the appropriate SQL.

public walkConditionalPrimary(ConditionalPrimary $primary) : string
Parameters
$primary : ConditionalPrimary
Tags
not-deprecated
Return values
string

walkConditionalTerm()

Walks down a ConditionalTerm AST node, thereby generating the appropriate SQL.

public walkConditionalTerm(ConditionalTerm $condTerm) : string
Parameters
$condTerm : ConditionalTerm
Tags
not-deprecated
Return values
string

walkDeleteClause()

Walks down a DeleteClause AST node, thereby generating the appropriate SQL.

public walkDeleteClause(DeleteClause $deleteClause) : string
Parameters
$deleteClause : DeleteClause
Tags
not-deprecated
Return values
string

walkDeleteStatement()

Walks down a DeleteStatement AST node, thereby generating the appropriate SQL.

public walkDeleteStatement(DeleteStatement $AST) : string
Parameters
$AST : DeleteStatement
Return values
string

walkEntityIdentificationVariable()

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

public walkEntityIdentificationVariable(string $identVariable) : string

This one differs of ->walkIdentificationVariable() because it generates the entity identifiers.

Parameters
$identVariable : string
Tags
not-deprecated
Return values
string

walkExistsExpression()

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

public walkExistsExpression(ExistsExpression $existsExpr) : string
Parameters
$existsExpr : ExistsExpression
Tags
not-deprecated
Return values
string

walkFromClause()

Walks down a FromClause AST node, thereby generating the appropriate SQL.

public walkFromClause(FromClause $fromClause) : string
Parameters
$fromClause : FromClause
Tags
not-deprecated
Return values
string

walkFunction()

Walks down a FunctionNode AST node, thereby generating the appropriate SQL.

public walkFunction(FunctionNode $function) : string
Parameters
$function : FunctionNode
Tags
not-deprecated
Return values
string

walkGeneralCaseExpression()

Walks down a GeneralCaseExpression AST node and generates the corresponding SQL.

public walkGeneralCaseExpression(GeneralCaseExpression $generalCaseExpression) : string
Parameters
$generalCaseExpression : GeneralCaseExpression
Tags
not-deprecated
Return values
string

The SQL.

walkGroupByClause()

Walks down a GroupByClause AST node, thereby generating the appropriate SQL.

public walkGroupByClause(GroupByClause $groupByClause) : string
Parameters
$groupByClause : GroupByClause
Tags
not-deprecated
Return values
string

walkGroupByItem()

Walks down a GroupByItem AST node, thereby generating the appropriate SQL.

public walkGroupByItem(PathExpression|string $groupByItem) : string
Parameters
$groupByItem : PathExpression|string
Tags
not-deprecated
Return values
string

walkHavingClause()

Walks down a HavingClause AST node, thereby generating the appropriate SQL.

public walkHavingClause(HavingClause $havingClause) : string
Parameters
$havingClause : HavingClause
Tags
not-deprecated
Return values
string

The SQL.

walkIdentificationVariable()

Walks down an IdentificationVariable (no AST node associated), thereby generating the SQL.

public walkIdentificationVariable(string $identificationVariable[, string $fieldName = null ]) : string
Parameters
$identificationVariable : string
$fieldName : string = null
Tags
not-deprecated
Return values
string

The SQL.

walkIndexBy()

Walks down a IndexBy AST node.

public walkIndexBy(IndexBy $indexBy) : void
Parameters
$indexBy : IndexBy
Tags
not-deprecated

walkInExpression()

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

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

Use walkInListExpression() or walkInSubselectExpression() instead.

Return values
string

walkInListExpression()

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

public walkInListExpression(InListExpression $inExpr) : string
Parameters
$inExpr : InListExpression
Return values
string

walkInParameter()

public walkInParameter(mixed $inParam) : string
Parameters
$inParam : mixed
Tags
not-deprecated
Return values
string

walkInputParameter()

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

public walkInputParameter(InputParameter $inputParam) : string
Parameters
$inputParam : InputParameter
Tags
not-deprecated
Return values
string

walkJoin()

Walks down a Join AST node and creates the corresponding SQL.

public walkJoin(Join $join) : string
Parameters
$join : Join
Tags
not-deprecated
Return values
string

walkJoinAssociationDeclaration()

Walks down a JoinAssociationDeclaration AST node, thereby generating the appropriate SQL.

public walkJoinAssociationDeclaration(JoinAssociationDeclaration $joinAssociationDeclaration[, int $joinType = ASTJoin::JOIN_TYPE_INNER ][, ConditionalExpression $condExpr = null ]) : string
Parameters
$joinAssociationDeclaration : JoinAssociationDeclaration
$joinType : int = ASTJoin::JOIN_TYPE_INNER
$condExpr : ConditionalExpression = null
Tags
psalm-param

AST\Join::JOIN_TYPE_* $joinType

throws
QueryException
not-deprecated
Return values
string

walkLikeExpression()

Walks down a LikeExpression AST node, thereby generating the appropriate SQL.

public walkLikeExpression(LikeExpression $likeExpr) : string
Parameters
$likeExpr : LikeExpression
Tags
not-deprecated
Return values
string

walkLiteral()

Walks down a literal that represents an AST node, thereby generating the appropriate SQL.

public walkLiteral(Literal $literal) : string
Parameters
$literal : Literal
Tags
not-deprecated
Return values
string

walkNewObject()

public walkNewObject(NewObjectExpression $newObjectExpression[, string|null $newObjectResultAlias = null ]) : string
Parameters
$newObjectExpression : NewObjectExpression
$newObjectResultAlias : string|null = null
Return values
string

The SQL.

walkNullComparisonExpression()

Walks down a NullComparisonExpression AST node, thereby generating the appropriate SQL.

public walkNullComparisonExpression(NullComparisonExpression $nullCompExpr) : string
Parameters
$nullCompExpr : NullComparisonExpression
Tags
not-deprecated
Return values
string

walkNullIfExpression()

Walks down a NullIfExpression AST node and generates the corresponding SQL.

public walkNullIfExpression(NullIfExpression $nullIfExpression) : string
Parameters
$nullIfExpression : NullIfExpression
Tags
not-deprecated
Return values
string

The SQL.

walkOrderByClause()

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

public walkOrderByClause(OrderByClause $orderByClause) : string
Parameters
$orderByClause : OrderByClause
Tags
not-deprecated
Return values
string

walkOrderByItem()

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

public walkOrderByItem(OrderByItem $orderByItem) : string
Parameters
$orderByItem : OrderByItem
Tags
not-deprecated
Return values
string

walkPathExpression()

Walks down a PathExpression AST node, thereby generating the appropriate SQL.

public walkPathExpression(PathExpression $pathExpr) : string
Parameters
$pathExpr : PathExpression
Tags
not-deprecated
Return values
string

walkQuantifiedExpression()

Walks down a QuantifiedExpression AST node, thereby generating the appropriate SQL.

public walkQuantifiedExpression(QuantifiedExpression $qExpr) : string
Parameters
$qExpr : QuantifiedExpression
Tags
not-deprecated
Return values
string

walkRangeVariableDeclaration()

Walks down a RangeVariableDeclaration AST node, thereby generating the appropriate SQL.

public walkRangeVariableDeclaration(RangeVariableDeclaration $rangeVariableDeclaration) : string
Parameters
$rangeVariableDeclaration : RangeVariableDeclaration
Tags
not-deprecated
Return values
string

walkResultVariable()

Walks down a ResultVariable that represents an AST node, thereby generating the appropriate SQL.

public walkResultVariable(string $resultVariable) : string
Parameters
$resultVariable : string
Tags
not-deprecated
Return values
string

walkSelectClause()

Walks down a SelectClause AST node, thereby generating the appropriate SQL.

public walkSelectClause(SelectClause $selectClause) : string
Parameters
$selectClause : SelectClause
Tags
not-deprecated
Return values
string

walkSelectExpression()

Walks down a SelectExpression AST node and generates the corresponding SQL.

public walkSelectExpression(SelectExpression $selectExpression) : string
Parameters
$selectExpression : SelectExpression
Tags
not-deprecated
Return values
string

walkSimpleArithmeticExpression()

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

public walkSimpleArithmeticExpression(SimpleArithmeticExpression $simpleArithmeticExpr) : string
Parameters
$simpleArithmeticExpr : SimpleArithmeticExpression
Tags
not-deprecated
Return values
string

walkSimpleCaseExpression()

Walks down a SimpleCaseExpression AST node and generates the corresponding SQL.

public walkSimpleCaseExpression(SimpleCaseExpression $simpleCaseExpression) : string
Parameters
$simpleCaseExpression : SimpleCaseExpression
Tags
not-deprecated
Return values
string

The SQL.

walkSimpleSelectClause()

Walks down a SimpleSelectClause AST node, thereby generating the appropriate SQL.

public walkSimpleSelectClause(SimpleSelectClause $simpleSelectClause) : string
Parameters
$simpleSelectClause : SimpleSelectClause
Tags
not-deprecated
Return values
string

walkSimpleSelectExpression()

Walks down a SimpleSelectExpression AST node, thereby generating the appropriate SQL.

public walkSimpleSelectExpression(SimpleSelectExpression $simpleSelectExpression) : string
Parameters
$simpleSelectExpression : SimpleSelectExpression
Tags
not-deprecated
Return values
string

walkStateFieldPathExpression()

Walks down a StateFieldPathExpression AST node, thereby generating the appropriate SQL.

public walkStateFieldPathExpression(PathExpression $stateFieldPathExpression) : string
Parameters
$stateFieldPathExpression : PathExpression
Tags
not-deprecated
Return values
string

walkStringPrimary()

Walks down a StringPrimary that represents an AST node, thereby generating the appropriate SQL.

public walkStringPrimary(mixed $stringPrimary) : string
Parameters
$stringPrimary : mixed
Tags
not-deprecated
Return values
string

walkSubselect()

Walks down a Subselect AST node, thereby generating the appropriate SQL.

public walkSubselect(Subselect $subselect) : string
Parameters
$subselect : Subselect
Tags
not-deprecated
Return values
string

walkSubselectFromClause()

Walks down a SubselectFromClause AST node, thereby generating the appropriate SQL.

public walkSubselectFromClause(SubselectFromClause $subselectFromClause) : string
Parameters
$subselectFromClause : SubselectFromClause
Tags
not-deprecated
Return values
string

walkUpdateClause()

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

public walkUpdateClause(UpdateClause $updateClause) : string
Parameters
$updateClause : UpdateClause
Tags
not-deprecated
Return values
string

walkUpdateItem()

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

public walkUpdateItem(UpdateItem $updateItem) : string
Parameters
$updateItem : UpdateItem
Tags
not-deprecated
Return values
string

walkUpdateStatement()

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

public walkUpdateStatement(UpdateStatement $AST) : string
Parameters
$AST : UpdateStatement
Return values
string

walkWhereClause()

Walks down a WhereClause AST node, thereby generating the appropriate SQL.

public walkWhereClause(WhereClause $whereClause) : string

WhereClause or not, the appropriate discriminator sql is added.

Parameters
$whereClause : WhereClause
Tags
not-deprecated
Return values
string

generateClassTableInheritanceJoins()

Generates the SQL JOINs that are necessary for Class Table Inheritance for the given class.

private generateClassTableInheritanceJoins(ClassMetadata $class, string $dqlAlias) : string
Parameters
$class : ClassMetadata

The class for which to generate the joins.

$dqlAlias : string

The DQL alias of the class.

Return values
string

The SQL.

generateDiscriminatorColumnConditionSQL()

Generates a discriminator column SQL condition for the class with the given DQL alias.

private generateDiscriminatorColumnConditionSQL(array<string|int, mixed> $dqlAliases) : string
Parameters
$dqlAliases : array<string|int, mixed>
Tags
psalm-param

list $dqlAliases List of root DQL aliases to inspect for discriminator restrictions.

Return values
string

generateFilterConditionSQL()

Generates the filter SQL for a given entity and table alias.

private generateFilterConditionSQL(ClassMetadata $targetEntity, string $targetTableAlias) : string
Parameters
$targetEntity : ClassMetadata

Metadata of the target entity.

$targetTableAlias : string

The table alias of the joined/selected table.

Return values
string

The SQL query part to add to a query.

generateOrderedCollectionOrderByItems()

private generateOrderedCollectionOrderByItems() : string
Return values
string

generateRangeVariableDeclarationSQL()

Generate appropriate SQL for RangeVariableDeclaration AST node

private generateRangeVariableDeclarationSQL(RangeVariableDeclaration $rangeVariableDeclaration, bool $buildNestedJoins) : string
Parameters
$rangeVariableDeclaration : RangeVariableDeclaration
$buildNestedJoins : bool
Return values
string

        
On this page

Search results