Homec4science

Replace getPagingValue() with cursor methods

Authored by epriestley <git@epriestley.com> on Apr 13 2015, 01:44.

Description

Replace getPagingValue() with cursor methods

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.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7803

Differential Revision: https://secure.phabricator.com/D12383

Details

Committed
epriestley <git@epriestley.com>Apr 13 2015, 20:58
Pushed
aubortJan 31 2017, 17:16
Parents
rPH09ad69238ee7: Drive conduit result ordering through Query order specifications
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH8efdc4aabf09: Replace getPagingValue() with cursor methods (authored by epriestley <git@epriestley.com>).Apr 13 2015, 20:58