Пример #1
0
 /**
  * @inheritdoc
  */
 public function rollbackDocument($documentName)
 {
     $backupTableName = self::BACKUP_DOCUMENT_PREFIX . $documentName;
     if ($this->resourceAdapter->isTableExists($backupTableName)) {
         $this->resourceAdapter->truncateTable($documentName);
         $select = $this->resourceAdapter->select()->from($backupTableName);
         $query = $this->resourceAdapter->insertFromSelect($select, $documentName);
         $this->resourceAdapter->query($query);
         $this->resourceAdapter->dropTable($backupTableName);
     }
 }