Page MenuHomePhabricator

Drive query ordering and paging more cohesively
ClosedPublic

Authored by epriestley on Apr 12 2015, 1:45 AM.
Tags
None
Referenced Files
F13992626: D12355.id29677.diff
Tue, Oct 22, 5:49 PM
F13970539: D12355.diff
Oct 17 2024, 8:16 AM
Unknown Object (File)
Sep 12 2024, 7:19 PM
Unknown Object (File)
Sep 2 2024, 10:14 AM
Unknown Object (File)
Aug 26 2024, 10:15 PM
Unknown Object (File)
Aug 25 2024, 12:38 AM
Unknown Object (File)
Aug 23 2024, 2:23 PM
Unknown Object (File)
Aug 17 2024, 10:14 PM
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.