コード例 #1
0
 public function delete()
 {
     //    $this->openTransaction();
     foreach ($this->loadChangesets() as $changeset) {
         $changeset->delete();
     }
     $ret = parent::delete();
     //    $this->saveTransaction();
     return $ret;
 }
コード例 #2
0
 public function delete()
 {
     $this->openTransaction();
     $legacy_hunks = id(new DifferentialLegacyHunk())->loadAllWhere('changesetID = %d', $this->getID());
     foreach ($legacy_hunks as $legacy_hunk) {
         $legacy_hunk->delete();
     }
     $modern_hunks = id(new DifferentialModernHunk())->loadAllWhere('changesetID = %d', $this->getID());
     foreach ($modern_hunks as $modern_hunk) {
         $modern_hunk->delete();
     }
     $this->unsavedHunks = array();
     queryfx($this->establishConnection('w'), 'DELETE FROM %T WHERE id = %d', self::TABLE_CACHE, $this->getID());
     $ret = parent::delete();
     $this->saveTransaction();
     return $ret;
 }
コード例 #3
0
 public function delete()
 {
     //    $this->openTransaction();
     foreach ($this->loadHunks() as $hunk) {
         $hunk->delete();
     }
     $this->_hunks = array();
     $ret = parent::delete();
     //    $this->saveTransaction();
     return $ret;
 }
コード例 #4
0
 public function delete()
 {
     $this->openTransaction();
     $diffs = $this->loadDiffs();
     foreach ($diffs as $diff) {
         $diff->delete();
     }
     $conn_w = $this->establishConnection('w');
     queryfx($conn_w, 'DELETE FROM %T WHERE revisionID = %d', self::RELATIONSHIP_TABLE, $this->getID());
     queryfx($conn_w, 'DELETE FROM %T WHERE revisionID = %d', self::TABLE_COMMIT, $this->getID());
     $comments = id(new DifferentialComment())->loadAllWhere('revisionID = %d', $this->getID());
     foreach ($comments as $comment) {
         $comment->delete();
     }
     $inlines = id(new DifferentialInlineComment())->loadAllWhere('revisionID = %d', $this->getID());
     foreach ($inlines as $inline) {
         $inline->delete();
     }
     $fields = id(new DifferentialAuxiliaryField())->loadAllWhere('revisionPHID = %s', $this->getPHID());
     foreach ($fields as $field) {
         $field->delete();
     }
     // we have to do paths a little differentally as they do not have
     // an id or phid column for delete() to act on
     $dummy_path = new DifferentialAffectedPath();
     queryfx($conn_w, 'DELETE FROM %T WHERE revisionID = %d', $dummy_path->getTableName(), $this->getID());
     $result = parent::delete();
     $this->saveTransaction();
     return $result;
 }
コード例 #5
0
 public function delete()
 {
     $this->openTransaction();
     foreach ($this->loadChangesets() as $changeset) {
         $changeset->delete();
     }
     $properties = id(new DifferentialDiffProperty())->loadAllWhere('diffID = %d', $this->getID());
     foreach ($properties as $prop) {
         $prop->delete();
     }
     $ret = parent::delete();
     $this->saveTransaction();
     return $ret;
 }
コード例 #6
0
 public function delete()
 {
     $this->openTransaction();
     foreach ($this->loadHunks() as $hunk) {
         $hunk->delete();
     }
     $this->_hunks = array();
     queryfx($this->establishConnection('w'), 'DELETE FROM %T WHERE id = %d', self::TABLE_CACHE, $this->getID());
     $ret = parent::delete();
     $this->saveTransaction();
     return $ret;
 }
コード例 #7
0
 public function delete()
 {
     $this->openTransaction();
     $diffs = $this->loadDiffs();
     foreach ($diffs as $diff) {
         $diff->delete();
     }
     $conn_w = $this->establishConnection('w');
     queryfx($conn_w, 'DELETE FROM %T WHERE revisionID = %d', self::RELATIONSHIP_TABLE, $this->getID());
     queryfx($conn_w, 'DELETE FROM %T WHERE revisionID = %d', self::TABLE_COMMIT, $this->getID());
     $comments = id(new DifferentialComment())->loadAllWhere('revisionID = %d', $this->getID());
     foreach ($comments as $comment) {
         $comment->delete();
     }
     $inlines = id(new DifferentialInlineComment())->loadAllWhere('revisionID = %d', $this->getID());
     foreach ($inlines as $inline) {
         $inline->delete();
     }
     $fields = id(new DifferentialAuxiliaryField())->loadAllWhere('revisionPHID = %s', $this->getPHID());
     foreach ($fields as $field) {
         $field->delete();
     }
     $paths = id(new DifferentialAffectedPath())->loadAllWhere('revisionID = %d', $this->getID());
     foreach ($paths as $path) {
         $path->delete();
     }
     $result = parent::delete();
     $this->saveTransaction();
     return $result;
 }