Page MenuHomePhabricator

Replace getPagingValue() with cursor methods
ClosedPublic

Authored by epriestley on Apr 12 2015, 11:49 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Dec 7, 8:49 AM
Unknown Object (File)
Thu, Dec 5, 8:00 AM
Unknown Object (File)
Thu, Dec 5, 12:32 AM
Unknown Object (File)
Wed, Nov 27, 6:14 PM
Unknown Object (File)
Wed, Nov 20, 11:31 AM
Unknown Object (File)
Nov 16 2024, 4:30 AM
Unknown Object (File)
Nov 11 2024, 10:15 PM
Unknown Object (File)
Nov 8 2024, 4:00 PM
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.