1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +01:00
phorge-phorge/src
epriestley 3ec4984f27 Use cursor-based paging in Differential
Summary:
Ref T603. Ref T2625. Use cursors to page Differential queries, not offsets.

The trick here is that some queries are ordered. In these cases, we either need to pass some kind of tuple or do a cursor lookup. For example, if you are viewing revisions ordered by `dateModified`, we can either have the next page be something like:

  ?afterDateModified=2398329373&afterID=292&order=modified

...or some magical token:

  ?afterToken=2398329373:292&order=modified

I think we did this in Conpherence, but one factor there was that paging orders update with some frequency. In most cases, I think it's reasonable to pass just the ID and do a lookup to get the actual clause value (e.g., go look up object ID 292 and see what its dateModified is) and I think this is much simpler in general.

Test Plan: Set page size in Differential to 3, and paged through result lists ordered by date created and date modified.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T603, T2625

Differential Revision: https://secure.phabricator.com/D6345
2013-07-03 05:45:07 -07:00
..
aphront Implement PhutilRequest parser #2 2013-06-24 08:22:26 -07:00
applications Use cursor-based paging in Differential 2013-07-03 05:45:07 -07:00
docs Fix default in docs 2013-06-28 11:46:35 -07:00
infrastructure Use cursor-based paging in Differential 2013-07-03 05:45:07 -07:00
view Add "state icons" to ObjectItemListView 2013-07-02 16:29:43 -07:00
__celerity_resource_map__.php Add "state icons" to ObjectItemListView 2013-07-02 16:29:43 -07:00
__phutil_library_init__.php Delete license headers from files 2012-11-05 11:16:51 -08:00
__phutil_library_map__.php Move "scripts/sql/probe.php" to "bin/storage probe" 2013-07-02 16:34:17 -07:00