Convert simple query subclasses to use internal cursors

Summary:
Depends on D20291. Ref T13259. Move all the simple cases (where paging depends only on the partial object and does not depend on keys) to a simple wrapper.

This leaves a smaller set of more complex cases where we care about external data or which keys were requested that I'll convert in followups.

Test Plan: Poked at things, but a lot of stuff is still broken until everything is converted.

Reviewers: amckinley

Reviewed By: amckinley

Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam

Maniphest Tasks: T13259

Differential Revision: https://secure.phabricator.com/D20292
This commit is contained in:
epriestley
2019-03-18 11:44:54 -07:00
parent 1b0ef43910
commit d4847c3eeb
20 changed files with 61 additions and 84 deletions

View File

@@ -201,12 +201,11 @@ final class PhabricatorProjectQuery
);
}
protected function getPagingValueMap($cursor, array $keys) {
$project = $this->loadCursorObject($cursor);
protected function newPagingMapFromPartialObject($object) {
return array(
'id' => $project->getID(),
'name' => $project->getName(),
'status' => $project->getStatus(),
'id' => (int)$object->getID(),
'name' => $object->getName(),
'status' => $object->getStatus(),
);
}