Documentation

ParserResult
in package

Encapsulates the resulting components from a DQL query parsing process that can be serialized.

Tags
link
http://www.doctrine-project.org

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
psalm-var

array<string|int, list>

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>

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
psalm-return

array<int|string, list> The parameter mappings.

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
psalm-return

list

Return values
array<string|int, int>

The positions of the corresponding SQL parameters.


        
On this page

Search results