mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 08:52:39 +01:00
Add a withoutIDs
method to PhabricatorDaemonLogQuery
.
Summary: Add a method to `PhabricatorDaemonLogQuery` to exclude IDs from the results. Test Plan: Thought long and hard. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley, Korvin Differential Revision: https://secure.phabricator.com/D9606
This commit is contained in:
parent
125b8dad7b
commit
7892627ccc
1 changed files with 13 additions and 0 deletions
|
@ -7,6 +7,7 @@ final class PhabricatorDaemonLogQuery
|
|||
const STATUS_ALIVE = 'status-alive';
|
||||
|
||||
private $ids;
|
||||
private $notIDs;
|
||||
private $status = self::STATUS_ALL;
|
||||
private $daemonClasses;
|
||||
private $allowStatusWrites;
|
||||
|
@ -24,6 +25,11 @@ final class PhabricatorDaemonLogQuery
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function withoutIDs(array $ids) {
|
||||
$this->notIDs = $ids;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function withStatus($status) {
|
||||
$this->status = $status;
|
||||
return $this;
|
||||
|
@ -119,6 +125,13 @@ final class PhabricatorDaemonLogQuery
|
|||
$this->ids);
|
||||
}
|
||||
|
||||
if ($this->notIDs) {
|
||||
$where[] = qsprintf(
|
||||
$conn_r,
|
||||
'id NOT IN (%Ld)',
|
||||
$this->notIDs);
|
||||
}
|
||||
|
||||
if ($this->getStatusConstants()) {
|
||||
$where[] = qsprintf(
|
||||
$conn_r,
|
||||
|
|
Loading…
Reference in a new issue