Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/query/DiffusionSymbolQuery.php
| Show First 20 Lines • Show All 186 Lines • ▼ Show 20 Lines | return qsprintf( | ||||
| $conn_r, | $conn_r, | ||||
| 'ORDER BY symbolName ASC'); | 'ORDER BY symbolName ASC'); | ||||
| } | } | ||||
| /** | /** | ||||
| * @task internal | * @task internal | ||||
| */ | */ | ||||
| protected function buildWhereClause(AphrontDatabaseConnection $conn_r) { | protected function buildWhereClause(AphrontDatabaseConnection $conn) { | ||||
| $where = array(); | $where = array(); | ||||
| if (isset($this->context)) { | if (isset($this->context)) { | ||||
| $where[] = qsprintf( | $where[] = qsprintf( | ||||
| $conn_r, | $conn, | ||||
| 'symbolContext = %s', | 'symbolContext = %s', | ||||
| $this->context); | $this->context); | ||||
| } | } | ||||
| if ($this->name) { | if ($this->name) { | ||||
| $where[] = qsprintf( | $where[] = qsprintf( | ||||
| $conn_r, | $conn, | ||||
| 'symbolName = %s', | 'symbolName = %s', | ||||
| $this->name); | $this->name); | ||||
| } | } | ||||
| if ($this->namePrefix) { | if ($this->namePrefix) { | ||||
| $where[] = qsprintf( | $where[] = qsprintf( | ||||
| $conn_r, | $conn, | ||||
| 'symbolName LIKE %>', | 'symbolName LIKE %>', | ||||
| $this->namePrefix); | $this->namePrefix); | ||||
| } | } | ||||
| if ($this->repositoryPHIDs) { | if ($this->repositoryPHIDs) { | ||||
| $where[] = qsprintf( | $where[] = qsprintf( | ||||
| $conn_r, | $conn, | ||||
| 'repositoryPHID IN (%Ls)', | 'repositoryPHID IN (%Ls)', | ||||
| $this->repositoryPHIDs); | $this->repositoryPHIDs); | ||||
| } | } | ||||
| if ($this->language) { | if ($this->language) { | ||||
| $where[] = qsprintf( | $where[] = qsprintf( | ||||
| $conn_r, | $conn, | ||||
| 'symbolLanguage = %s', | 'symbolLanguage = %s', | ||||
| $this->language); | $this->language); | ||||
| } | } | ||||
| if ($this->type) { | if ($this->type) { | ||||
| $where[] = qsprintf( | $where[] = qsprintf( | ||||
| $conn_r, | $conn, | ||||
| 'symbolType = %s', | 'symbolType = %s', | ||||
| $this->type); | $this->type); | ||||
| } | } | ||||
| return $this->formatWhereClause($where); | return $this->formatWhereClause($conn, $where); | ||||
| } | } | ||||
| /** | /** | ||||
| * @task internal | * @task internal | ||||
| */ | */ | ||||
| private function loadPaths(array $symbols) { | private function loadPaths(array $symbols) { | ||||
| assert_instances_of($symbols, 'PhabricatorRepositorySymbol'); | assert_instances_of($symbols, 'PhabricatorRepositorySymbol'); | ||||
| Show All 37 Lines | |||||