Homec4science

Drive query ordering and paging more cohesively

Authored by epriestley <git@epriestley.com> on Apr 12 2015, 03:38.

Description

Drive query ordering and paging more cohesively

Summary:
Ref T7803. Ordering and paging are inherently intertwined, but they often aren't driven by the same data right now.

Start driving them through the same data:

  • getOrderableColumns() defines orderable and pageable columns.
  • getPagingValueMap() reads values from a cursor.

This is generally sufficient to implement both paging and ordering.

Also, add some more sanity checks to try to curtail the number of ambiguous/invalid orderings applications produce, since these cause subtle/messy bugs.

Test Plan:

  • Paged through pastes and a few other object types.
  • Intentionally changed defaults to be invalid and hit some of the errors.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7803

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

Details

Committed
epriestley <git@epriestley.com>Apr 13 2015, 20:58
Pushed
aubortJan 31 2017, 17:16
Parents
rPHe6174ed45cbd: Fix an issue where pastes could be reordered as a side effect of cache fills
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHa40c40fade6a: Drive query ordering and paging more cohesively (authored by epriestley <git@epriestley.com>).Apr 13 2015, 20:58