コード例 #1
0
ファイル: Schema.php プロジェクト: rajeshpillai/df-azure
 /**
  * {@inheritdoc}
  */
 public function deleteTable($table, $check_empty = false)
 {
     $name = is_array($table) ? ArrayUtils::get($table, 'name') : $table;
     if (empty($name)) {
         throw new BadRequestException('Table name can not be empty.');
     }
     try {
         $this->parent->getConnection()->deleteTable($name);
         $this->refreshCachedTables();
         return array('name' => $name);
     } catch (\Exception $ex) {
         throw new InternalServerErrorException("Failed to delete table '{$name}'.\n{$ex->getMessage()}");
     }
 }
コード例 #2
0
ファイル: Table.php プロジェクト: rajeshpillai/df-azure
 /**
  * {@inheritdoc}
  */
 protected function rollbackTransaction()
 {
     if (!isset($this->backupOps)) {
         switch ($this->getAction()) {
             case Verbs::POST:
             case Verbs::PUT:
             case Verbs::PATCH:
             case Verbs::MERGE:
             case Verbs::DELETE:
                 /** @var BatchResult $result */
                 $this->parent->getConnection()->batch($this->backupOps);
                 break;
             default:
                 break;
         }
         $this->backupOps = null;
     }
     return true;
 }