Changeset View
Changeset View
Standalone View
Standalone View
src/applications/files/query/PhabricatorFileQuery.php
| Show All 13 Lines | final class PhabricatorFileQuery | ||||
| private $minLength; | private $minLength; | ||||
| private $maxLength; | private $maxLength; | ||||
| private $names; | private $names; | ||||
| private $isPartial; | private $isPartial; | ||||
| private $isDeleted; | private $isDeleted; | ||||
| private $needTransforms; | private $needTransforms; | ||||
| private $builtinKeys; | private $builtinKeys; | ||||
| private $isBuiltin; | private $isBuiltin; | ||||
| private $storageEngines; | |||||
| public function withIDs(array $ids) { | public function withIDs(array $ids) { | ||||
| $this->ids = $ids; | $this->ids = $ids; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function withPHIDs(array $phids) { | public function withPHIDs(array $phids) { | ||||
| $this->phids = $phids; | $this->phids = $phids; | ||||
| ▲ Show 20 Lines • Show All 102 Lines • ▼ Show 20 Lines | final class PhabricatorFileQuery | ||||
| } | } | ||||
| public function withNameNgrams($ngrams) { | public function withNameNgrams($ngrams) { | ||||
| return $this->withNgramsConstraint( | return $this->withNgramsConstraint( | ||||
| id(new PhabricatorFileNameNgrams()), | id(new PhabricatorFileNameNgrams()), | ||||
| $ngrams); | $ngrams); | ||||
| } | } | ||||
| public function withStorageEngines(array $engines) { | |||||
| $this->storageEngines = $engines; | |||||
| return $this; | |||||
| } | |||||
| public function showOnlyExplicitUploads($explicit_uploads) { | public function showOnlyExplicitUploads($explicit_uploads) { | ||||
| $this->explicitUploads = $explicit_uploads; | $this->explicitUploads = $explicit_uploads; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function needTransforms(array $transforms) { | public function needTransforms(array $transforms) { | ||||
| $this->needTransforms = $transforms; | $this->needTransforms = $transforms; | ||||
| return $this; | return $this; | ||||
| ▲ Show 20 Lines • Show All 316 Lines • ▼ Show 20 Lines | if ($this->isBuiltin !== null) { | ||||
| 'builtinKey IS NOT NULL'); | 'builtinKey IS NOT NULL'); | ||||
| } else { | } else { | ||||
| $where[] = qsprintf( | $where[] = qsprintf( | ||||
| $conn, | $conn, | ||||
| 'builtinKey IS NULL'); | 'builtinKey IS NULL'); | ||||
| } | } | ||||
| } | } | ||||
| if ($this->storageEngines !== null) { | |||||
| $where[] = qsprintf( | |||||
| $conn, | |||||
| 'storageEngine IN (%Ls)', | |||||
| $this->storageEngines); | |||||
| } | |||||
| return $where; | return $where; | ||||
| } | } | ||||
| protected function getPrimaryTableAlias() { | protected function getPrimaryTableAlias() { | ||||
| return 'f'; | return 'f'; | ||||
| } | } | ||||
| public function getQueryApplicationClass() { | public function getQueryApplicationClass() { | ||||
| return 'PhabricatorFilesApplication'; | return 'PhabricatorFilesApplication'; | ||||
| } | } | ||||
| } | } | ||||