ParserResult
in package
Encapsulates the resulting components from a DQL query parsing process that can be serialized.
Tags
Table of Contents
- $_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.
- __construct() : mixed
- Initializes a new instance of the <tt>ParserResult</tt> class.
- 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.
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.
Return values
mixed —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
Return values
void —getParameterMappings()
Gets all DQL to SQL parameter mappings.
public
getParameterMappings() : mixed
Tags
Return values
mixed —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
AbstractSqlExecutor —getSqlParameterPositions()
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
Return values
void —setSqlExecutor()
Sets the SQL executor that should be used for this ParserResult.
public
setSqlExecutor(AbstractSqlExecutor $executor) : void
Parameters
- $executor : AbstractSqlExecutor