Changeset View
Changeset View
Standalone View
Standalone View
src/applications/drydock/query/DrydockResourceQuery.php
Show First 20 Lines • Show All 94 Lines • ▼ Show 20 Lines | final class DrydockResourceQuery extends DrydockQuery { | ||||
} | } | ||||
protected function buildWhereClauseParts(AphrontDatabaseConnection $conn) { | protected function buildWhereClauseParts(AphrontDatabaseConnection $conn) { | ||||
$where = parent::buildWhereClauseParts($conn); | $where = parent::buildWhereClauseParts($conn); | ||||
if ($this->ids !== null) { | if ($this->ids !== null) { | ||||
$where[] = qsprintf( | $where[] = qsprintf( | ||||
$conn, | $conn, | ||||
'id IN (%Ld)', | 'resource.id IN (%Ld)', | ||||
$this->ids); | $this->ids); | ||||
} | } | ||||
if ($this->phids !== null) { | if ($this->phids !== null) { | ||||
$where[] = qsprintf( | $where[] = qsprintf( | ||||
$conn, | $conn, | ||||
'phid IN (%Ls)', | 'resource.phid IN (%Ls)', | ||||
$this->phids); | $this->phids); | ||||
} | } | ||||
if ($this->types !== null) { | if ($this->types !== null) { | ||||
$where[] = qsprintf( | $where[] = qsprintf( | ||||
$conn, | $conn, | ||||
'type IN (%Ls)', | 'resource.type IN (%Ls)', | ||||
$this->types); | $this->types); | ||||
} | } | ||||
if ($this->statuses !== null) { | if ($this->statuses !== null) { | ||||
$where[] = qsprintf( | $where[] = qsprintf( | ||||
$conn, | $conn, | ||||
'status IN (%Ls)', | 'resource.status IN (%Ls)', | ||||
$this->statuses); | $this->statuses); | ||||
} | } | ||||
if ($this->blueprintPHIDs !== null) { | if ($this->blueprintPHIDs !== null) { | ||||
$where[] = qsprintf( | $where[] = qsprintf( | ||||
$conn, | $conn, | ||||
'blueprintPHID IN (%Ls)', | 'resource.blueprintPHID IN (%Ls)', | ||||
$this->blueprintPHIDs); | $this->blueprintPHIDs); | ||||
} | } | ||||
if ($this->datasourceQuery !== null) { | if ($this->datasourceQuery !== null) { | ||||
$where[] = qsprintf( | $where[] = qsprintf( | ||||
$conn, | $conn, | ||||
'name LIKE %>', | 'resource.name LIKE %>', | ||||
$this->datasourceQuery); | $this->datasourceQuery); | ||||
} | } | ||||
return $where; | return $where; | ||||
} | } | ||||
protected function getPrimaryTableAlias() { | |||||
return 'resource'; | |||||
} | |||||
} | } |