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
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
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
$conn
private
Connection
$conn
$em
private
EntityManagerInterface
$em
$newObjectCounter
Counter for generating indexes.
private
int
$newObjectCounter
= 0
$orderedColumnsMap
Map from Table-Alias + Column-Name to OrderBy-Direction.
private
array<string, string>
$orderedColumnsMap
= []
$parserResult
private
ParserResult
$parserResult
$platform
The database platform abstraction.
private
AbstractPlatform
$platform
$query
private
Query
$query
$queryComponents
Map of all components/classes that appear in the DQL query.
private
mixed
$queryComponents
Tags
$quoteStrategy
The quote strategy.
private
QuoteStrategy
$quoteStrategy
$rootAliases
The DQL alias of the root class of the currently traversed query.
private
mixed
$rootAliases
= []
Tags
$rsm
private
ResultSetMapping
$rsm
$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
$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
$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
getConnection()
Gets the Connection used by the walker.
public
getConnection() : Connection
Return values
ConnectiongetEntityManager()
Gets the EntityManager used by the walker.
public
getEntityManager() : EntityManagerInterface
Return values
EntityManagerInterfacegetExecutor()
Gets an executor that can be used to execute the result of this walker.
public
getExecutor(DeleteStatement|UpdateStatement|SelectStatement $AST) : AbstractSqlExecutor
Parameters
Tags
Return values
AbstractSqlExecutorgetMetadataForDqlAlias()
public
getMetadataForDqlAlias(string $dqlAlias) : ClassMetadata
Parameters
- $dqlAlias : string
Return values
ClassMetadatagetQuery()
Gets the Query instance used by the walker.
public
getQuery() : Query
Return values
QuerygetQueryComponent()
Gets the information about a single query component.
public
getQueryComponent(string $dqlAlias) : array<string|int, mixed>
Parameters
- $dqlAlias : string
-
The DQL alias.
Tags
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
stringgetSQLTableAlias()
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
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
stringwalkAggregateExpression()
Walks down an AggregateExpression AST node, thereby generating the appropriate SQL.
public
walkAggregateExpression(AggregateExpression $aggExpression) : string
Parameters
- $aggExpression : AggregateExpression
Tags
Return values
stringwalkArithmeticExpression()
Walks down an ArithmeticExpression AST node, thereby generating the appropriate SQL.
public
walkArithmeticExpression(ArithmeticExpression $arithmeticExpr) : string
Parameters
- $arithmeticExpr : ArithmeticExpression
Tags
Return values
stringwalkArithmeticFactor()
Walks down an ArithmeticFactor that represents an AST node, thereby generating the appropriate SQL.
public
walkArithmeticFactor(mixed $factor) : string
Parameters
- $factor : mixed
Tags
Return values
stringwalkArithmeticPrimary()
Walks down an ArithmeticPrimary that represents an AST node, thereby generating the appropriate SQL.
public
walkArithmeticPrimary(mixed $primary) : string
Parameters
- $primary : mixed
Tags
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
Return values
stringwalkBetweenExpression()
Walks down a BetweenExpression AST node, thereby generating the appropriate SQL.
public
walkBetweenExpression(BetweenExpression $betweenExpr) : string
Parameters
- $betweenExpr : BetweenExpression
Tags
Return values
stringwalkCoalesceExpression()
Walks down a CoalesceExpression AST node and generates the corresponding SQL.
public
walkCoalesceExpression(CoalesceExpression $coalesceExpression) : string
Parameters
- $coalesceExpression : CoalesceExpression
Tags
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
Return values
stringwalkComparisonExpression()
Walks down a ComparisonExpression AST node, thereby generating the appropriate SQL.
public
walkComparisonExpression(ComparisonExpression $compExpr) : string
Parameters
- $compExpr : ComparisonExpression
Tags
Return values
stringwalkConditionalExpression()
Walk down a ConditionalExpression AST node, thereby generating the appropriate SQL.
public
walkConditionalExpression(ConditionalExpression $condExpr) : string
Parameters
- $condExpr : ConditionalExpression
Tags
Return values
stringwalkConditionalFactor()
Walks down a ConditionalFactor AST node, thereby generating the appropriate SQL.
public
walkConditionalFactor(ConditionalFactor $factor) : string
Parameters
- $factor : ConditionalFactor
Tags
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
Return values
stringwalkConditionalTerm()
Walks down a ConditionalTerm AST node, thereby generating the appropriate SQL.
public
walkConditionalTerm(ConditionalTerm $condTerm) : string
Parameters
- $condTerm : ConditionalTerm
Tags
Return values
stringwalkDeleteClause()
Walks down a DeleteClause AST node, thereby generating the appropriate SQL.
public
walkDeleteClause(DeleteClause $deleteClause) : string
Parameters
- $deleteClause : DeleteClause
Tags
Return values
stringwalkDeleteStatement()
Walks down a DeleteStatement AST node, thereby generating the appropriate SQL.
public
walkDeleteStatement(DeleteStatement $AST) : string
Parameters
- $AST : DeleteStatement
Return values
stringwalkEmptyCollectionComparisonExpression()
Walks down an EmptyCollectionComparisonExpression AST node, thereby generating the appropriate SQL.
public
walkEmptyCollectionComparisonExpression(EmptyCollectionComparisonExpression $emptyCollCompExpr) : string
Parameters
- $emptyCollCompExpr : EmptyCollectionComparisonExpression
Tags
Return values
stringwalkEntityIdentificationVariable()
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
Return values
stringwalkExistsExpression()
Walks down an ExistsExpression AST node, thereby generating the appropriate SQL.
public
walkExistsExpression(ExistsExpression $existsExpr) : string
Parameters
- $existsExpr : ExistsExpression
Tags
Return values
stringwalkFromClause()
Walks down a FromClause AST node, thereby generating the appropriate SQL.
public
walkFromClause(FromClause $fromClause) : string
Parameters
- $fromClause : FromClause
Tags
Return values
stringwalkFunction()
Walks down a FunctionNode AST node, thereby generating the appropriate SQL.
public
walkFunction(FunctionNode $function) : string
Parameters
- $function : FunctionNode
Tags
Return values
stringwalkGeneralCaseExpression()
Walks down a GeneralCaseExpression AST node and generates the corresponding SQL.
public
walkGeneralCaseExpression(GeneralCaseExpression $generalCaseExpression) : string
Parameters
- $generalCaseExpression : GeneralCaseExpression
Tags
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
Return values
stringwalkGroupByItem()
Walks down a GroupByItem AST node, thereby generating the appropriate SQL.
public
walkGroupByItem(PathExpression|string $groupByItem) : string
Parameters
- $groupByItem : PathExpression|string
Tags
Return values
stringwalkHavingClause()
Walks down a HavingClause AST node, thereby generating the appropriate SQL.
public
walkHavingClause(HavingClause $havingClause) : string
Parameters
- $havingClause : HavingClause
Tags
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
Return values
string —The SQL.
walkIdentificationVariableDeclaration()
Walks down a IdentificationVariableDeclaration AST node, thereby generating the appropriate SQL.
public
walkIdentificationVariableDeclaration(IdentificationVariableDeclaration $identificationVariableDecl) : string
Parameters
- $identificationVariableDecl : IdentificationVariableDeclaration
Tags
Return values
stringwalkIndexBy()
Walks down a IndexBy AST node.
public
walkIndexBy(IndexBy $indexBy) : void
Parameters
- $indexBy : IndexBy
Tags
walkInExpression()
Walks down an InExpression AST node, thereby generating the appropriate SQL.
public
walkInExpression(InExpression $inExpr) : string
Parameters
- $inExpr : InExpression
Tags
Return values
stringwalkInListExpression()
Walks down an InExpression AST node, thereby generating the appropriate SQL.
public
walkInListExpression(InListExpression $inExpr) : string
Parameters
- $inExpr : InListExpression
Return values
stringwalkInParameter()
public
walkInParameter(mixed $inParam) : string
Parameters
- $inParam : mixed
Tags
Return values
stringwalkInputParameter()
Walks down an InputParameter AST node, thereby generating the appropriate SQL.
public
walkInputParameter(InputParameter $inputParam) : string
Parameters
- $inputParam : InputParameter
Tags
Return values
stringwalkInstanceOfExpression()
Walks down an InstanceOfExpression AST node, thereby generating the appropriate SQL.
public
walkInstanceOfExpression(InstanceOfExpression $instanceOfExpr) : string
Parameters
- $instanceOfExpr : InstanceOfExpression
Tags
Return values
stringwalkInSubselectExpression()
Walks down an InExpression AST node, thereby generating the appropriate SQL.
public
walkInSubselectExpression(InSubselectExpression $inExpr) : string
Parameters
- $inExpr : InSubselectExpression
Return values
stringwalkJoin()
Walks down a Join AST node and creates the corresponding SQL.
public
walkJoin(Join $join) : string
Parameters
- $join : Join
Tags
Return values
stringwalkJoinAssociationDeclaration()
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
Return values
stringwalkLikeExpression()
Walks down a LikeExpression AST node, thereby generating the appropriate SQL.
public
walkLikeExpression(LikeExpression $likeExpr) : string
Parameters
- $likeExpr : LikeExpression
Tags
Return values
stringwalkLiteral()
Walks down a literal that represents an AST node, thereby generating the appropriate SQL.
public
walkLiteral(Literal $literal) : string
Parameters
- $literal : Literal
Tags
Return values
stringwalkNewObject()
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
Return values
stringwalkNullIfExpression()
Walks down a NullIfExpression AST node and generates the corresponding SQL.
public
walkNullIfExpression(NullIfExpression $nullIfExpression) : string
Parameters
- $nullIfExpression : NullIfExpression
Tags
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
Return values
stringwalkOrderByItem()
Walks down an OrderByItem AST node, thereby generating the appropriate SQL.
public
walkOrderByItem(OrderByItem $orderByItem) : string
Parameters
- $orderByItem : OrderByItem
Tags
Return values
stringwalkParenthesisExpression()
public
walkParenthesisExpression(ParenthesisExpression $parenthesisExpression) : string
Parameters
- $parenthesisExpression : ParenthesisExpression
Return values
stringwalkPathExpression()
Walks down a PathExpression AST node, thereby generating the appropriate SQL.
public
walkPathExpression(PathExpression $pathExpr) : string
Parameters
- $pathExpr : PathExpression
Tags
Return values
stringwalkQuantifiedExpression()
Walks down a QuantifiedExpression AST node, thereby generating the appropriate SQL.
public
walkQuantifiedExpression(QuantifiedExpression $qExpr) : string
Parameters
- $qExpr : QuantifiedExpression
Tags
Return values
stringwalkRangeVariableDeclaration()
Walks down a RangeVariableDeclaration AST node, thereby generating the appropriate SQL.
public
walkRangeVariableDeclaration(RangeVariableDeclaration $rangeVariableDeclaration) : string
Parameters
- $rangeVariableDeclaration : RangeVariableDeclaration
Tags
Return values
stringwalkResultVariable()
Walks down a ResultVariable that represents an AST node, thereby generating the appropriate SQL.
public
walkResultVariable(string $resultVariable) : string
Parameters
- $resultVariable : string
Tags
Return values
stringwalkSelectClause()
Walks down a SelectClause AST node, thereby generating the appropriate SQL.
public
walkSelectClause(SelectClause $selectClause) : string
Parameters
- $selectClause : SelectClause
Tags
Return values
stringwalkSelectExpression()
Walks down a SelectExpression AST node and generates the corresponding SQL.
public
walkSelectExpression(SelectExpression $selectExpression) : string
Parameters
- $selectExpression : SelectExpression
Tags
Return values
stringwalkSelectStatement()
Walks down a SelectStatement AST node, thereby generating the appropriate SQL.
public
walkSelectStatement(SelectStatement $AST) : string
Parameters
- $AST : SelectStatement
Return values
stringwalkSimpleArithmeticExpression()
Walks down an SimpleArithmeticExpression AST node, thereby generating the appropriate SQL.
public
walkSimpleArithmeticExpression(SimpleArithmeticExpression $simpleArithmeticExpr) : string
Parameters
- $simpleArithmeticExpr : SimpleArithmeticExpression
Tags
Return values
stringwalkSimpleCaseExpression()
Walks down a SimpleCaseExpression AST node and generates the corresponding SQL.
public
walkSimpleCaseExpression(SimpleCaseExpression $simpleCaseExpression) : string
Parameters
- $simpleCaseExpression : SimpleCaseExpression
Tags
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
Return values
stringwalkSimpleSelectExpression()
Walks down a SimpleSelectExpression AST node, thereby generating the appropriate SQL.
public
walkSimpleSelectExpression(SimpleSelectExpression $simpleSelectExpression) : string
Parameters
- $simpleSelectExpression : SimpleSelectExpression
Tags
Return values
stringwalkStateFieldPathExpression()
Walks down a StateFieldPathExpression AST node, thereby generating the appropriate SQL.
public
walkStateFieldPathExpression(PathExpression $stateFieldPathExpression) : string
Parameters
- $stateFieldPathExpression : PathExpression
Tags
Return values
stringwalkStringPrimary()
Walks down a StringPrimary that represents an AST node, thereby generating the appropriate SQL.
public
walkStringPrimary(mixed $stringPrimary) : string
Parameters
- $stringPrimary : mixed
Tags
Return values
stringwalkSubselect()
Walks down a Subselect AST node, thereby generating the appropriate SQL.
public
walkSubselect(Subselect $subselect) : string
Parameters
- $subselect : Subselect
Tags
Return values
stringwalkSubselectFromClause()
Walks down a SubselectFromClause AST node, thereby generating the appropriate SQL.
public
walkSubselectFromClause(SubselectFromClause $subselectFromClause) : string
Parameters
- $subselectFromClause : SubselectFromClause
Tags
Return values
stringwalkUpdateClause()
Walks down an UpdateClause AST node, thereby generating the appropriate SQL.
public
walkUpdateClause(UpdateClause $updateClause) : string
Parameters
- $updateClause : UpdateClause
Tags
Return values
stringwalkUpdateItem()
Walks down an UpdateItem AST node, thereby generating the appropriate SQL.
public
walkUpdateItem(UpdateItem $updateItem) : string
Parameters
- $updateItem : UpdateItem
Tags
Return values
stringwalkUpdateStatement()
Walks down an UpdateStatement AST node, thereby generating the appropriate SQL.
public
walkUpdateStatement(UpdateStatement $AST) : string
Parameters
- $AST : UpdateStatement
Return values
stringwalkWhereClause()
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
Return values
stringgenerateClassTableInheritanceJoins()
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
Return values
stringgenerateFilterConditionSQL()
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
stringgenerateRangeVariableDeclarationSQL()
Generate appropriate SQL for RangeVariableDeclaration AST node
private
generateRangeVariableDeclarationSQL(RangeVariableDeclaration $rangeVariableDeclaration, bool $buildNestedJoins) : string
Parameters
- $rangeVariableDeclaration : RangeVariableDeclaration
- $buildNestedJoins : bool
Return values
stringgetChildDiscriminatorsFromClassMetadata()
private
getChildDiscriminatorsFromClassMetadata(ClassMetadata $rootClass, InstanceOfExpression $instanceOfExpr) : string
Parameters
- $rootClass : ClassMetadata
- $instanceOfExpr : InstanceOfExpression
Tags
Return values
string —The list in parentheses of valid child discriminators from the given class