ParserResult
in package
Encapsulates the resulting components from a DQL query parsing process that can be serialized.
Tags
Table of Contents
Constants
- LEGACY_PROPERTY_MAPPING = ['sqlExecutor' => '_sqlExecutor', 'resultSetMapping' => '_resultSetMapping', 'parameterMappings' => '_parameterMappings']
Properties
- $parameterMappings : mixed
- The mappings of DQL parameter names/positions to SQL parameter positions.
- $resultSetMapping : ResultSetMapping
- The ResultSetMapping that describes how to map the SQL result set.
- $sqlExecutor : AbstractSqlExecutor
- The SQL executor used for executing the SQL.
Methods
- __construct() : mixed
- Initializes a new instance of the <tt>ParserResult</tt> class.
- __unserialize() : void
- __wakeup() : void
- addParameterMapping() : void
- Adds a DQL to SQL parameter mapping. One DQL parameter name/position can map to several SQL parameter positions.
- getParameterMappings() : mixed
- Gets all DQL to SQL parameter mappings.
- getResultSetMapping() : ResultSetMapping
- Gets the ResultSetMapping for the parsed query.
- getSqlExecutor() : AbstractSqlExecutor
- Gets the SQL executor used by this ParserResult.
- getSqlParameterPositions() : array<string|int, int>
- Gets the SQL parameter positions for a DQL parameter name/position.
- setResultSetMapping() : void
- Sets the ResultSetMapping of the parsed query.
- setSqlExecutor() : void
- Sets the SQL executor that should be used for this ParserResult.
Constants
LEGACY_PROPERTY_MAPPING
private
mixed
LEGACY_PROPERTY_MAPPING
= ['sqlExecutor' => '_sqlExecutor', 'resultSetMapping' => '_resultSetMapping', 'parameterMappings' => '_parameterMappings']
Properties
$parameterMappings
The mappings of DQL parameter names/positions to SQL parameter positions.
private
mixed
$parameterMappings
= []
Tags
$resultSetMapping
The ResultSetMapping that describes how to map the SQL result set.
private
ResultSetMapping
$resultSetMapping
$sqlExecutor
The SQL executor used for executing the SQL.
private
AbstractSqlExecutor
$sqlExecutor
Methods
__construct()
Initializes a new instance of the <tt>ParserResult</tt> class.
public
__construct() : mixed
The new instance is initialized with an empty ResultSetMapping.
__unserialize()
public
__unserialize(array<string, mixed> $data) : void
Parameters
- $data : array<string, mixed>
__wakeup()
public
__wakeup() : void
addParameterMapping()
Adds a DQL to SQL parameter mapping. One DQL parameter name/position can map to several SQL parameter positions.
public
addParameterMapping(string|int $dqlPosition, int $sqlPosition) : void
Parameters
- $dqlPosition : string|int
- $sqlPosition : int
getParameterMappings()
Gets all DQL to SQL parameter mappings.
public
getParameterMappings() : mixed
Tags
getResultSetMapping()
Gets the ResultSetMapping for the parsed query.
public
getResultSetMapping() : ResultSetMapping
Return values
ResultSetMapping —The result set mapping of the parsed query
getSqlExecutor()
Gets the SQL executor used by this ParserResult.
public
getSqlExecutor() : AbstractSqlExecutor
Return values
AbstractSqlExecutorgetSqlParameterPositions()
Gets the SQL parameter positions for a DQL parameter name/position.
public
getSqlParameterPositions(string|int $dqlPosition) : array<string|int, int>
Parameters
- $dqlPosition : string|int
-
The name or position of the DQL parameter.
Tags
Return values
array<string|int, int> —The positions of the corresponding SQL parameters.
setResultSetMapping()
Sets the ResultSetMapping of the parsed query.
public
setResultSetMapping(ResultSetMapping $rsm) : void
Parameters
- $rsm : ResultSetMapping
setSqlExecutor()
Sets the SQL executor that should be used for this ParserResult.
public
setSqlExecutor(AbstractSqlExecutor $executor) : void
Parameters
- $executor : AbstractSqlExecutor