Page MenuHomePhabricator

Replace getPagingValue() with cursor methods
ClosedPublic

Authored by epriestley on Apr 12 2015, 11:49 PM.
Tags
None
Referenced Files
F13097321: D12383.id29726.diff
Thu, Apr 25, 10:55 PM
Unknown Object (File)
Mon, Apr 8, 10:54 AM
Unknown Object (File)
Thu, Apr 4, 2:07 AM
Unknown Object (File)
Wed, Apr 3, 7:12 PM
Unknown Object (File)
Wed, Apr 3, 5:10 PM
Unknown Object (File)
Feb 3 2024, 3:04 AM
Unknown Object (File)
Jan 31 2024, 7:00 PM
Unknown Object (File)
Jan 26 2024, 2:43 AM
Subscribers

Details

Summary

Ref T7803. Prior to this change sequence, Query classes conflated paging values (the actual thing that goes in a "x > 3" clause) with cursor values (arbitrary identifiers which track where the user is in a result list).

Although the two can sometimes be the same, the vast majority of implementations are simpler and better when object IDs are used as cursors and paging values are derived from them.

The new stuff handles this in a consistent way, so we're free to separate getPagingValue() from paging. The new method is essentially getResultCursor().

This also implements getPageCursors(), which allows queries to return directional cursors. The inability to do this was a practical limitation blocking the implementation of T7803.

Test Plan
  • Browsed a bunch of results and paged through queries.
  • Grepped for removed methods.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Replace getPagingValue() with cursor methods.
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, 6:13 PM
This revision was automatically updated to reflect the committed changes.