Exemple #1
0
 /**
  * {@inheritdoc}
  */
 protected function handleQueryException(\PDOException $e, $query, array $args = array(), $options = array())
 {
     // The database schema might be changed by another process in between the
     // time that the statement was prepared and the time the statement was run
     // (e.g. usually happens when running tests). In this case, we need to
     // re-run the query.
     // @see http://www.sqlite.org/faq.html#q15
     // @see http://www.sqlite.org/rescode.html#schema
     if (!empty($e->errorInfo[1]) && $e->errorInfo[1] === 17) {
         return $this->query($query, $args, $options);
     }
     parent::handleQueryException($e, $query, $args, $options);
 }