Changeset View
Changeset View
Standalone View
Standalone View
src/applications/drydock/query/DrydockLogQuery.php
<?php | <?php | ||||
final class DrydockLogQuery extends DrydockQuery { | final class DrydockLogQuery extends DrydockQuery { | ||||
private $ids; | |||||
private $blueprintPHIDs; | private $blueprintPHIDs; | ||||
private $resourcePHIDs; | private $resourcePHIDs; | ||||
private $leasePHIDs; | private $leasePHIDs; | ||||
private $operationPHIDs; | private $operationPHIDs; | ||||
public function withIDs(array $ids) { | |||||
$this->ids = $ids; | |||||
return $this; | |||||
} | |||||
public function withBlueprintPHIDs(array $phids) { | public function withBlueprintPHIDs(array $phids) { | ||||
$this->blueprintPHIDs = $phids; | $this->blueprintPHIDs = $phids; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function withResourcePHIDs(array $phids) { | public function withResourcePHIDs(array $phids) { | ||||
$this->resourcePHIDs = $phids; | $this->resourcePHIDs = $phids; | ||||
return $this; | return $this; | ||||
▲ Show 20 Lines • Show All 103 Lines • ▼ Show 20 Lines | protected function didFilterPage(array $logs) { | ||||
} | } | ||||
return $logs; | return $logs; | ||||
} | } | ||||
protected function buildWhereClauseParts(AphrontDatabaseConnection $conn) { | protected function buildWhereClauseParts(AphrontDatabaseConnection $conn) { | ||||
$where = parent::buildWhereClauseParts($conn); | $where = parent::buildWhereClauseParts($conn); | ||||
if ($this->ids !== null) { | |||||
$where[] = qsprintf( | |||||
$conn, | |||||
'id IN (%Ls)', | |||||
$this->ids); | |||||
} | |||||
if ($this->blueprintPHIDs !== null) { | if ($this->blueprintPHIDs !== null) { | ||||
$where[] = qsprintf( | $where[] = qsprintf( | ||||
$conn, | $conn, | ||||
'blueprintPHID IN (%Ls)', | 'blueprintPHID IN (%Ls)', | ||||
$this->blueprintPHIDs); | $this->blueprintPHIDs); | ||||
} | } | ||||
if ($this->resourcePHIDs !== null) { | if ($this->resourcePHIDs !== null) { | ||||
Show All 24 Lines |