Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / xhprof / query / PhabricatorXHProfSampleQuery.php
blob3e9643a7fcd7c4e77a589adf6f062beab28ac50c
1 <?php
3 final class PhabricatorXHProfSampleQuery
4 extends PhabricatorCursorPagedPolicyAwareQuery {
6 private $ids;
7 private $phids;
9 public function withIDs(array $ids) {
10 $this->ids = $ids;
11 return $this;
14 public function withPHIDs(array $phids) {
15 $this->phids = $phids;
16 return $this;
19 public function newResultObject() {
20 return new PhabricatorXHProfSample();
23 protected function loadPage() {
24 return $this->loadStandardPage($this->newResultObject());
27 protected function buildWhereClauseParts(AphrontDatabaseConnection $conn) {
28 $where = parent::buildWhereClauseParts($conn);
30 if ($this->ids !== null) {
31 $where[] = qsprintf(
32 $conn,
33 'id IN (%Ld)',
34 $this->ids);
37 if ($this->phids !== null) {
38 $where[] = qsprintf(
39 $conn,
40 'phid IN (%Ls)',
41 $this->phids);
44 return $where;
47 public function getQueryApplicationClass() {
48 return 'PhabricatorXHProfApplication';