sql = $sql; return $this; } /** * Gets the SQL query. */ public function getSQL(): string { return $this->sql; } /** * {@inheritDoc} */ protected function _doExecute() { $parameters = []; $types = []; foreach ($this->getParameters() as $parameter) { $name = $parameter->getName(); $value = $this->processParameterValue($parameter->getValue()); $type = $parameter->getValue() === $value ? $parameter->getType() : Query\ParameterTypeInferer::inferType($value); $parameters[$name] = $value; $types[$name] = $type; } if ($parameters && is_int(key($parameters))) { ksort($parameters); ksort($types); $parameters = array_values($parameters); $types = array_values($types); } return $this->_em->getConnection()->executeQuery( $this->sql, $parameters, $types, $this->_queryCacheProfile ); } }