Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15502989
D18915.id45346.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D18915.id45346.diff
View Options
diff --git a/src/applications/repository/query/PhabricatorRepositoryPushEventQuery.php b/src/applications/repository/query/PhabricatorRepositoryPushEventQuery.php
--- a/src/applications/repository/query/PhabricatorRepositoryPushEventQuery.php
+++ b/src/applications/repository/query/PhabricatorRepositoryPushEventQuery.php
@@ -34,19 +34,12 @@
return $this;
}
+ public function newResultObject() {
+ return new PhabricatorRepositoryPushEvent();
+ }
+
protected function loadPage() {
- $table = new PhabricatorRepositoryPushEvent();
- $conn_r = $table->establishConnection('r');
-
- $data = queryfx_all(
- $conn_r,
- 'SELECT * FROM %T %Q %Q %Q',
- $table->getTableName(),
- $this->buildWhereClause($conn_r),
- $this->buildOrderClause($conn_r),
- $this->buildLimitClause($conn_r));
-
- return $table->loadAllFromArray($data);
+ return $this->loadStandardPage($this->newResultObject());
}
protected function willFilterPage(array $events) {
@@ -88,40 +81,38 @@
return $events;
}
- protected function buildWhereClause(AphrontDatabaseConnection $conn_r) {
- $where = array();
+ protected function buildWhereClauseParts(AphrontDatabaseConnection $conn) {
+ $where = parent::buildWhereClauseParts($conn);
- if ($this->ids) {
+ if ($this->ids !== null) {
$where[] = qsprintf(
- $conn_r,
+ $conn,
'id IN (%Ld)',
$this->ids);
}
- if ($this->phids) {
+ if ($this->phids !== null) {
$where[] = qsprintf(
- $conn_r,
+ $conn,
'phid IN (%Ls)',
$this->phids);
}
- if ($this->repositoryPHIDs) {
+ if ($this->repositoryPHIDs !== null) {
$where[] = qsprintf(
- $conn_r,
+ $conn,
'repositoryPHID IN (%Ls)',
$this->repositoryPHIDs);
}
- if ($this->pusherPHIDs) {
+ if ($this->pusherPHIDs !== null) {
$where[] = qsprintf(
- $conn_r,
+ $conn,
'pusherPHID in (%Ls)',
$this->pusherPHIDs);
}
- $where[] = $this->buildPagingClause($conn_r);
-
- return $this->formatWhereClause($where);
+ return $where;
}
public function getQueryApplicationClass() {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 15, 5:55 AM (3 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7694485
Default Alt Text
D18915.id45346.diff (2 KB)
Attached To
Mode
D18915: Modernize "PhabricatorRepositoryPushEventQuery"
Attached
Detach File
Event Timeline
Log In to Comment