12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <?php
-
-
- namespace Doctrine\ORM;
-
-
- final class NativeQuery extends AbstractQuery
- {
- private $_sql;
-
-
-
- public function setSQL($sql)
- {
- $this->_sql = $sql;
- return $this;
- }
-
-
-
- public function getSQL()
- {
- return $this->_sql;
- }
-
-
-
- protected function _doExecute()
- {
- $stmt = $this->_em->getConnection()->prepare($this->_sql);
- $params = $this->_params;
- foreach ($params as $key => $value) {
- if (isset($this->_paramTypes[$key])) {
- $stmt->bindValue($key, $value, $this->_paramTypes[$key]);
- } else {
- $stmt->bindValue($key, $value);
- }
- }
- $stmt->execute();
-
- return $stmt;
- }
- }
|