Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diviner/query/DivinerBookQuery.php
Show First 20 Lines • Show All 127 Lines • ▼ Show 20 Lines | protected function buildWhereClause(AphrontDatabaseConnection $conn) { | ||||
if ($this->phids) { | if ($this->phids) { | ||||
$where[] = qsprintf( | $where[] = qsprintf( | ||||
$conn, | $conn, | ||||
'phid IN (%Ls)', | 'phid IN (%Ls)', | ||||
$this->phids); | $this->phids); | ||||
} | } | ||||
if (strlen($this->nameLike)) { | if (phutil_nonempty_string($this->nameLike)) { | ||||
$where[] = qsprintf( | $where[] = qsprintf( | ||||
$conn, | $conn, | ||||
'name LIKE %~', | 'name LIKE %~', | ||||
$this->nameLike); | $this->nameLike); | ||||
} | } | ||||
if ($this->names !== null) { | if ($this->names !== null) { | ||||
$where[] = qsprintf( | $where[] = qsprintf( | ||||
$conn, | $conn, | ||||
'name IN (%Ls)', | 'name IN (%Ls)', | ||||
$this->names); | $this->names); | ||||
} | } | ||||
if (strlen($this->namePrefix)) { | if (phutil_nonempty_string($this->namePrefix)) { | ||||
$where[] = qsprintf( | $where[] = qsprintf( | ||||
$conn, | $conn, | ||||
'name LIKE %>', | 'name LIKE %>', | ||||
$this->namePrefix); | $this->namePrefix); | ||||
} | } | ||||
if ($this->repositoryPHIDs !== null) { | if ($this->repositoryPHIDs !== null) { | ||||
$where[] = qsprintf( | $where[] = qsprintf( | ||||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0