Homec4science

Allow policy-aware queries to prefilter results

Authored by epriestley <git@epriestley.com> on Oct 23 2012, 21:01.

Description

Allow policy-aware queries to prefilter results

Summary:
Provides a simple way for policy-aware queries to pre-filter results without needing to maintain separate cursors, and fixes a bunch of filter-related edge cases.

  • For reverse-paged cursor queries, we previously reversed each individual set of results. If the final result set is built out of multiple pages, it's in the wrong order overall, with each page in the correct order in sequence. Instead, reverse everything at the end. This also simplifies construction of queries.
  • AphrontCursorPagerView would always render a "<< First" link when paging backward, even if we were on the first page of results.
  • Add a filtering hook to let queries perform in-application pre-policy filtering as simply as possible (i.e., without maintaing their own cursors over the result sets).

Test Plan: Made feed randomly prefilter half the results, and paged forward and backward. Observed correct result ordering, pagination, and next/previous links.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran

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

Details

Committed
epriestley <git@epriestley.com>Oct 23 2012, 21:01
Pushed
aubortJan 31 2017, 17:16
Parents
rPH0b9101f3c5f0: Make lightbox close when the background is clicked
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH51c4b199d027: Allow policy-aware queries to prefilter results (authored by epriestley <git@epriestley.com>).Oct 23 2012, 21:01