Page MenuHomePhabricator

Replace getPagingValue() with cursor methods
ClosedPublic

Authored by epriestley on Apr 12 2015, 11:49 PM.
Tags
None
Referenced Files
F13292106: D12383.id.diff
Wed, Jun 5, 1:32 AM
F13283320: D12383.diff
Sun, Jun 2, 2:03 PM
F13269647: D12383.diff
Wed, May 29, 6:36 AM
F13230971: D12383.id29726.diff
Mon, May 20, 11:29 PM
F13228494: D12383.id29726.diff
Mon, May 20, 9:53 AM
F13220316: D12383.id29770.diff
Sun, May 19, 12:48 AM
F13215399: D12383.diff
Fri, May 17, 5:02 PM
F13199606: D12383.diff
Mon, May 13, 4:12 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
Branch
rpaging20
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 5274
Build 5292: [Placeholder Plan] Wait for 30 Seconds

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.