Changeset View
Changeset View
Standalone View
Standalone View
src/applications/files/query/PhabricatorFileQuery.php
Show All 9 Lines | final class PhabricatorFileQuery | ||||
private $transforms; | private $transforms; | ||||
private $dateCreatedAfter; | private $dateCreatedAfter; | ||||
private $dateCreatedBefore; | private $dateCreatedBefore; | ||||
private $contentHashes; | private $contentHashes; | ||||
private $minLength; | private $minLength; | ||||
private $maxLength; | private $maxLength; | ||||
private $names; | private $names; | ||||
private $isPartial; | private $isPartial; | ||||
private $isDeleted; | |||||
private $needTransforms; | private $needTransforms; | ||||
private $builtinKeys; | private $builtinKeys; | ||||
public function withIDs(array $ids) { | public function withIDs(array $ids) { | ||||
$this->ids = $ids; | $this->ids = $ids; | ||||
return $this; | return $this; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 88 Lines • ▼ Show 20 Lines | public function withNames(array $names) { | ||||
return $this; | return $this; | ||||
} | } | ||||
public function withIsPartial($partial) { | public function withIsPartial($partial) { | ||||
$this->isPartial = $partial; | $this->isPartial = $partial; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function withIsDeleted($deleted) { | |||||
$this->isDeleted = $deleted; | |||||
return $this; | |||||
} | |||||
public function withNameNgrams($ngrams) { | public function withNameNgrams($ngrams) { | ||||
return $this->withNgramsConstraint( | return $this->withNgramsConstraint( | ||||
id(new PhabricatorFileNameNgrams()), | id(new PhabricatorFileNameNgrams()), | ||||
$ngrams); | $ngrams); | ||||
} | } | ||||
public function showOnlyExplicitUploads($explicit_uploads) { | public function showOnlyExplicitUploads($explicit_uploads) { | ||||
$this->explicitUploads = $explicit_uploads; | $this->explicitUploads = $explicit_uploads; | ||||
▲ Show 20 Lines • Show All 261 Lines • ▼ Show 20 Lines | protected function buildWhereClauseParts(AphrontDatabaseConnection $conn) { | ||||
if ($this->isPartial !== null) { | if ($this->isPartial !== null) { | ||||
$where[] = qsprintf( | $where[] = qsprintf( | ||||
$conn, | $conn, | ||||
'isPartial = %d', | 'isPartial = %d', | ||||
(int)$this->isPartial); | (int)$this->isPartial); | ||||
} | } | ||||
if ($this->isDeleted !== null) { | |||||
$where[] = qsprintf( | |||||
$conn, | |||||
'isDeleted = %d', | |||||
(int)$this->isDeleted); | |||||
} | |||||
if ($this->builtinKeys !== null) { | if ($this->builtinKeys !== null) { | ||||
$where[] = qsprintf( | $where[] = qsprintf( | ||||
$conn, | $conn, | ||||
'builtinKey IN (%Ls)', | 'builtinKey IN (%Ls)', | ||||
$this->builtinKeys); | $this->builtinKeys); | ||||
} | } | ||||
return $where; | return $where; | ||||
Show All 11 Lines |