Beispiel #1
0
 /**
  * @param bool $useTransaction
  */
 public function execute($useTransaction = true)
 {
     $statements = $this->getSqlStatements();
     if ($useTransaction) {
         array_unshift($statements, 'BEGIN');
         $statements[] = 'COMMIT';
     }
     foreach ($statements as $stmt) {
         $this->conn->exec($stmt);
     }
     $this->reset();
 }
Beispiel #2
0
 /**
  * (re)create view
  *
  * @param PlatformInterface $platform
  * @param string            $viewName
  */
 private function createView(PlatformInterface $platform, $viewName)
 {
     $sqlStatement = $this->schema->getViewStatement($viewName);
     $sql = $platform->getCreateViewSql($viewName, $sqlStatement);
     $this->conn->exec($sql);
 }