HomePhorge

Allow policy-aware queries to prefilter results

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

Provenance
epriestleyAuthored on Oct 23 2012, 12:01 PM
themackabuPushed on Mar 25 2025, 8:07 PM
Parents
rP0b9101f3c5f0: Make lightbox close when the background is clicked
Branches
Unknown
Tags
Unknown

Event Timeline