Differential D13174 Diff 31876 src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php
Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php
Show First 20 Lines • Show All 70 Lines • ▼ Show 20 Lines | final public function setBeforeID($object_id) { | ||||
$this->beforeID = $object_id; | $this->beforeID = $object_id; | ||||
return $this; | return $this; | ||||
} | } | ||||
final protected function getBeforeID() { | final protected function getBeforeID() { | ||||
return $this->beforeID; | return $this->beforeID; | ||||
} | } | ||||
public function loadStandardPage(PhabricatorLiskDAO $table) { | |||||
$conn = $table->establishConnection('r'); | |||||
$rows = queryfx_all( | |||||
$conn, | |||||
'%Q FROM %T %Q %Q %Q %Q %Q %Q %Q', | |||||
$this->buildSelectClause($conn), | |||||
$table->getTableName(), | |||||
(string)$this->getPrimaryTableAlias(), | |||||
$this->buildJoinClause($conn), | |||||
$this->buildWhereClause($conn), | |||||
$this->buildGroupClause($conn), | |||||
$this->buildHavingClause($conn), | |||||
$this->buildOrderClause($conn), | |||||
$this->buildLimitClause($conn)); | |||||
return $table->loadAllFromArray($rows); | |||||
} | |||||
/** | /** | ||||
* Get the viewer for making cursor paging queries. | * Get the viewer for making cursor paging queries. | ||||
* | * | ||||
* NOTE: You should ONLY use this viewer to load cursor objects while | * NOTE: You should ONLY use this viewer to load cursor objects while | ||||
* building paging queries. | * building paging queries. | ||||
* | * | ||||
* Cursor paging can happen in two ways. First, the user can request a page | * Cursor paging can happen in two ways. First, the user can request a page | ||||
▲ Show 20 Lines • Show All 1,690 Lines • Show Last 20 Lines |