SqlWalker
in package
implements
TreeWalker
The SqlWalker is a TreeWalker that walks over a DQL AST and constructs the corresponding SQL.
Interfaces, Classes, Traits and Enums
- TreeWalker
- Interface for walkers of DQL ASTs (abstract syntax trees).
Table of Contents
- 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.
- $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.
- __construct() : mixed
- Initializes TreeWalker with important information about the ASTs to be walked.
- 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.
- 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, array<string, mixed>>
- 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.
- 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.
- 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()
Initializes TreeWalker with important information about the ASTs to be walked.
public
__construct(mixed $query, mixed $parserResult, array<string|int, mixed> $queryComponents) : mixed
Parameters
- $query : mixed
-
The parsed Query.
- $parserResult : mixed
-
The result of the parsing process.
- $queryComponents : array<string|int, mixed>
-
The query components (symbol table).
Return values
mixed —getConnection()
Gets the Connection used by the walker.
public
getConnection() : Connection
Return values
Connection —getEntityManager()
Gets the EntityManager used by the walker.
public
getEntityManager() : EntityManagerInterface
Return values
EntityManagerInterface —getExecutor()
Gets an executor that can be used to execute the result of this walker.
public
getExecutor(mixed $AST) : AbstractSqlExecutor
Parameters
- $AST : mixed
Return values
AbstractSqlExecutor —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
Return values
array<string|int, mixed> —getQueryComponents()
Returns internal queryComponents array.
public
getQueryComponents() : array<string, array<string, mixed>>
Return values
array<string, array<string, mixed>> —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(mixed $dqlAlias, array<string|int, mixed> $queryComponent) : void
Parameters
- $dqlAlias : mixed
-
The DQL alias.
- $queryComponent : array<string|int, mixed>
Return values
void —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(mixed $aggExpression) : string
Parameters
- $aggExpression : mixed
Return values
string —The SQL.
walkArithmeticExpression()
Walks down an ArithmeticExpression AST node, thereby generating the appropriate SQL.
public
walkArithmeticExpression(mixed $arithmeticExpr) : string
Parameters
- $arithmeticExpr : mixed
Return values
string —The SQL.
walkArithmeticFactor()
Walks down an ArithmeticFactor that represents an AST node, thereby generating the appropriate SQL.
public
walkArithmeticFactor(mixed $factor) : string
Parameters
- $factor : mixed
Return values
string —The SQL.
walkArithmeticPrimary()
Walks down an ArithmeticPrimary that represents an AST node, thereby generating the appropriate SQL.
public
walkArithmeticPrimary(mixed $primary) : string
Parameters
- $primary : mixed
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
Return values
string —The SQL.
walkBetweenExpression()
Walks down a BetweenExpression AST node, thereby generating the appropriate SQL.
public
walkBetweenExpression(mixed $betweenExpr) : string
Parameters
- $betweenExpr : mixed
Return values
string —The SQL.
walkCoalesceExpression()
Walks down a CoalesceExpression AST node and generates the corresponding SQL.
public
walkCoalesceExpression(CoalesceExpression $coalesceExpression) : string
Parameters
- $coalesceExpression : CoalesceExpression
Return values
string —The SQL.
walkCollectionMemberExpression()
Walks down a CollectionMemberExpression AST node, thereby generating the appropriate SQL.
public
walkCollectionMemberExpression(mixed $collMemberExpr) : string
Parameters
- $collMemberExpr : mixed
Return values
string —The SQL.
walkComparisonExpression()
Walks down a ComparisonExpression AST node, thereby generating the appropriate SQL.
public
walkComparisonExpression(mixed $compExpr) : string
Parameters
- $compExpr : mixed
Return values
string —The SQL.
walkConditionalExpression()
Walk down a ConditionalExpression AST node, thereby generating the appropriate SQL.
public
walkConditionalExpression(mixed $condExpr) : string
Parameters
- $condExpr : mixed
Return values
string —The SQL.
walkConditionalFactor()
Walks down a ConditionalFactor AST node, thereby generating the appropriate SQL.
public
walkConditionalFactor(mixed $factor) : string
Parameters
- $factor : mixed
Return values
string —The SQL.
walkConditionalPrimary()
Walks down a ConditionalPrimary AST node, thereby generating the appropriate SQL.
public
walkConditionalPrimary(mixed $primary) : string
Parameters
- $primary : mixed
Return values
string —The SQL.
walkConditionalTerm()
Walks down a ConditionalTerm AST node, thereby generating the appropriate SQL.
public
walkConditionalTerm(mixed $condTerm) : string
Parameters
- $condTerm : mixed
Return values
string —The SQL.
walkDeleteClause()
Walks down a DeleteClause AST node, thereby generating the appropriate SQL.
public
walkDeleteClause(DeleteClause $deleteClause) : string
Parameters
- $deleteClause : DeleteClause
Return values
string —The SQL.
walkDeleteStatement()
Walks down a DeleteStatement AST node, thereby generating the appropriate SQL.
public
walkDeleteStatement(DeleteStatement $AST) : string
Parameters
- $AST : DeleteStatement
Return values
string —The SQL.
walkEmptyCollectionComparisonExpression()
Walks down an EmptyCollectionComparisonExpression AST node, thereby generating the appropriate SQL.
public
walkEmptyCollectionComparisonExpression(mixed $emptyCollCompExpr) : string
Parameters
- $emptyCollCompExpr : mixed
Return values
string —The SQL.
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
Return values
string —walkExistsExpression()
Walks down an ExistsExpression AST node, thereby generating the appropriate SQL.
public
walkExistsExpression(mixed $existsExpr) : string
Parameters
- $existsExpr : mixed
Return values
string —The SQL.
walkFromClause()
Walks down a FromClause AST node, thereby generating the appropriate SQL.
public
walkFromClause(mixed $fromClause) : string
Parameters
- $fromClause : mixed
Return values
string —The SQL.
walkFunction()
Walks down a FunctionNode AST node, thereby generating the appropriate SQL.
public
walkFunction(mixed $function) : string
Parameters
- $function : mixed
Return values
string —The SQL.
walkGeneralCaseExpression()
Walks down a GeneralCaseExpression AST node and generates the corresponding SQL.
public
walkGeneralCaseExpression(GeneralCaseExpression $generalCaseExpression) : string
Parameters
- $generalCaseExpression : GeneralCaseExpression
Return values
string —The SQL.
walkGroupByClause()
Walks down a GroupByClause AST node, thereby generating the appropriate SQL.
public
walkGroupByClause(mixed $groupByClause) : string
Parameters
- $groupByClause : mixed
Return values
string —The SQL.
walkGroupByItem()
Walks down a GroupByItem AST node, thereby generating the appropriate SQL.
public
walkGroupByItem(mixed $groupByItem) : string
Parameters
- $groupByItem : mixed
Return values
string —The SQL.
walkHavingClause()
Walks down a HavingClause AST node, thereby generating the appropriate SQL.
public
walkHavingClause(mixed $havingClause) : string
Parameters
- $havingClause : mixed
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
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
Return values
string —walkIndexBy()
Walks down a IndexBy AST node.
public
walkIndexBy(IndexBy $indexBy) : void
Parameters
- $indexBy : IndexBy
Return values
void —walkInExpression()
Walks down an InExpression AST node, thereby generating the appropriate SQL.
public
walkInExpression(mixed $inExpr) : string
Parameters
- $inExpr : mixed
Return values
string —The SQL.
walkInParameter()
public
walkInParameter(mixed $inParam) : string
Parameters
- $inParam : mixed
Return values
string —walkInputParameter()
Walks down an InputParameter AST node, thereby generating the appropriate SQL.
public
walkInputParameter(mixed $inputParam) : string
Parameters
- $inputParam : mixed
Return values
string —The SQL.
walkInstanceOfExpression()
Walks down an InstanceOfExpression AST node, thereby generating the appropriate SQL.
public
walkInstanceOfExpression(mixed $instanceOfExpr) : string
Parameters
- $instanceOfExpr : mixed
Tags
Return values
string —The SQL.
walkJoin()
Walks down a Join AST node and creates the corresponding SQL.
public
walkJoin(mixed $join) : string
Parameters
- $join : mixed
Return values
string —The SQL.
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
Return values
string —walkLikeExpression()
Walks down a LikeExpression AST node, thereby generating the appropriate SQL.
public
walkLikeExpression(mixed $likeExpr) : string
Parameters
- $likeExpr : mixed
Return values
string —The SQL.
walkLiteral()
Walks down a literal that represents an AST node, thereby generating the appropriate SQL.
public
walkLiteral(mixed $literal) : string
Parameters
- $literal : mixed
Return values
string —The SQL.
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(mixed $nullCompExpr) : string
Parameters
- $nullCompExpr : mixed
Return values
string —The SQL.
walkNullIfExpression()
Walks down a NullIfExpression AST node and generates the corresponding SQL.
public
walkNullIfExpression(NullIfExpression $nullIfExpression) : string
Parameters
- $nullIfExpression : NullIfExpression
Return values
string —The SQL.
walkOrderByClause()
Walks down an OrderByClause AST node, thereby generating the appropriate SQL.
public
walkOrderByClause(mixed $orderByClause) : string
Parameters
- $orderByClause : mixed
Return values
string —The SQL.
walkOrderByItem()
Walks down an OrderByItem AST node, thereby generating the appropriate SQL.
public
walkOrderByItem(mixed $orderByItem) : string
Parameters
- $orderByItem : mixed
Return values
string —The SQL.
walkParenthesisExpression()
public
walkParenthesisExpression(ParenthesisExpression $parenthesisExpression) : string
Parameters
- $parenthesisExpression : ParenthesisExpression
Return values
string —walkPathExpression()
Walks down a PathExpression AST node, thereby generating the appropriate SQL.
public
walkPathExpression(mixed $pathExpr) : string
Parameters
- $pathExpr : mixed
Return values
string —The SQL.
walkQuantifiedExpression()
Walks down a QuantifiedExpression AST node, thereby generating the appropriate SQL.
public
walkQuantifiedExpression(mixed $qExpr) : string
Parameters
- $qExpr : mixed
Return values
string —The SQL.
walkRangeVariableDeclaration()
Walks down a RangeVariableDeclaration AST node, thereby generating the appropriate SQL.
public
walkRangeVariableDeclaration(RangeVariableDeclaration $rangeVariableDeclaration) : string
Parameters
- $rangeVariableDeclaration : RangeVariableDeclaration
Return values
string —walkResultVariable()
Walks down a ResultVariable that represents an AST node, thereby generating the appropriate SQL.
public
walkResultVariable(mixed $resultVariable) : string
Parameters
- $resultVariable : mixed
Return values
string —The SQL.
walkSelectClause()
Walks down a SelectClause AST node, thereby generating the appropriate SQL.
public
walkSelectClause(mixed $selectClause) : string
Parameters
- $selectClause : mixed
Return values
string —The SQL.
walkSelectExpression()
Walks down a SelectExpression AST node and generates the corresponding SQL.
public
walkSelectExpression(mixed $selectExpression) : string
Parameters
- $selectExpression : mixed
Return values
string —The SQL.
walkSelectStatement()
Walks down a SelectStatement AST node, thereby generating the appropriate SQL.
public
walkSelectStatement(SelectStatement $AST) : string
Parameters
- $AST : SelectStatement
Return values
string —The SQL.
walkSimpleArithmeticExpression()
Walks down an SimpleArithmeticExpression AST node, thereby generating the appropriate SQL.
public
walkSimpleArithmeticExpression(mixed $simpleArithmeticExpr) : string
Parameters
- $simpleArithmeticExpr : mixed
Return values
string —The SQL.
walkSimpleCaseExpression()
Walks down a SimpleCaseExpression AST node and generates the corresponding SQL.
public
walkSimpleCaseExpression(SimpleCaseExpression $simpleCaseExpression) : string
Parameters
- $simpleCaseExpression : SimpleCaseExpression
Return values
string —The SQL.
walkSimpleSelectClause()
Walks down a SimpleSelectClause AST node, thereby generating the appropriate SQL.
public
walkSimpleSelectClause(mixed $simpleSelectClause) : string
Parameters
- $simpleSelectClause : mixed
Return values
string —The SQL.
walkSimpleSelectExpression()
Walks down a SimpleSelectExpression AST node, thereby generating the appropriate SQL.
public
walkSimpleSelectExpression(mixed $simpleSelectExpression) : string
Parameters
- $simpleSelectExpression : mixed
Return values
string —The SQL.
walkStateFieldPathExpression()
Walks down a StateFieldPathExpression AST node, thereby generating the appropriate SQL.
public
walkStateFieldPathExpression(mixed $stateFieldPathExpression) : string
Parameters
- $stateFieldPathExpression : mixed
Return values
string —The SQL.
walkStringPrimary()
Walks down a StringPrimary that represents an AST node, thereby generating the appropriate SQL.
public
walkStringPrimary(mixed $stringPrimary) : string
Parameters
- $stringPrimary : mixed
Return values
string —The SQL.
walkSubselect()
Walks down a Subselect AST node, thereby generating the appropriate SQL.
public
walkSubselect(mixed $subselect) : string
Parameters
- $subselect : mixed
Return values
string —The SQL.
walkSubselectFromClause()
Walks down a SubselectFromClause AST node, thereby generating the appropriate SQL.
public
walkSubselectFromClause(mixed $subselectFromClause) : string
Parameters
- $subselectFromClause : mixed
Return values
string —The SQL.
walkUpdateClause()
Walks down an UpdateClause AST node, thereby generating the appropriate SQL.
public
walkUpdateClause(mixed $updateClause) : string
Parameters
- $updateClause : mixed
Return values
string —The SQL.
walkUpdateItem()
Walks down an UpdateItem AST node, thereby generating the appropriate SQL.
public
walkUpdateItem(mixed $updateItem) : string
Parameters
- $updateItem : mixed
Return values
string —The SQL.
walkUpdateStatement()
Walks down an UpdateStatement AST node, thereby generating the appropriate SQL.
public
walkUpdateStatement(UpdateStatement $AST) : string
Parameters
- $AST : UpdateStatement
Return values
string —The SQL.
walkWhereClause()
Walks down a WhereClause AST node, thereby generating the appropriate SQL.
public
walkWhereClause(mixed $whereClause) : string
Parameters
- $whereClause : mixed
Return values
string —The SQL.
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
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 —getChildDiscriminatorsFromClassMetadata()
private
getChildDiscriminatorsFromClassMetadata(ClassMetadataInfo $rootClass, InstanceOfExpression $instanceOfExpr) : string
Parameters
- $rootClass : ClassMetadataInfo
- $instanceOfExpr : InstanceOfExpression
Tags
Return values
string —The list in parentheses of valid child discriminators from the given class