Page MenuHomePhabricator

Drive query ordering and paging more cohesively
ClosedPublic

Authored by epriestley on Apr 12 2015, 1:45 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 12, 9:26 PM
Unknown Object (File)
Tue, Apr 9, 3:16 AM
Unknown Object (File)
Sat, Apr 6, 12:53 AM
Unknown Object (File)
Mar 6 2024, 3:06 PM
Unknown Object (File)
Mar 1 2024, 2:17 PM
Unknown Object (File)
Mar 1 2024, 1:45 PM
Unknown Object (File)
Feb 18 2024, 1:43 AM
Unknown Object (File)
Feb 8 2024, 9:19 AM
Subscribers

Details

Summary

Ref T7803. Ordering and paging are inherently intertwined, but they often aren't driven by the same data right now.

Start driving them through the same data:

  • getOrderableColumns() defines orderable and pageable columns.
  • getPagingValueMap() reads values from a cursor.

This is generally sufficient to implement both paging and ordering.

Also, add some more sanity checks to try to curtail the number of ambiguous/invalid orderings applications produce, since these cause subtle/messy bugs.

Test Plan
  • Paged through pastes and a few other object types.
  • Intentionally changed defaults to be invalid and hit some of the errors.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Drive query ordering and paging more cohesively.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.
btrahan edited edge metadata.
This revision is now accepted and ready to land.Apr 13 2015, 5:11 PM
This revision was automatically updated to reflect the committed changes.