Ejemplo n.º 1
0
 /**
  * @param Statement $statement
  * @return Pgsql
  */
 public function registerStatementPrototype(Statement $statement)
 {
     $this->statementPrototype = $statement;
     $this->statementPrototype->setDriver($this);
     // needs access to driver to createResult()
     return $this;
 }
Ejemplo n.º 2
0
 public function execute($parameters = null)
 {
     if ($parameters === null) {
         if ($this->parameterContainer != null) {
             $saveParams = (array) $this->parameterContainer->getNamedArray();
         } else {
             $saveParams = array();
         }
     } else {
         $saveParams = $parameters;
     }
     $stack = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
     $queryId = $this->getProfiler()->startQuery($this->getSql(), $saveParams, $stack);
     $result = parent::execute($parameters);
     $this->getProfiler()->endQuery($queryId);
     return $result;
 }