Add an option for turning distinct off when querying review requests.

Review Request #13370 — Created Oct. 23, 2023 and submitted

Information

Review Board
release-5.0.x

Reviewers

This adds a distinct option for ReviewRequest.objects._query and all
wrapping functions, allowing callers to query review requests without
distinct. When distinct is turned on (which is still the default for
now), it can impact how queries are built, breaking .count() for
instance.

A future version of Review Board is likely to switch the default for
distinct to False, but this will require further testing.

The _query() function was given type hints in the process, to help
with the implementation of the function. Work has not been done on the
wrapping functions to provide type hints.

Unit tests pass.

Tested this with some in-progress code to simplify queries for the
datagrid pagination.

Summary ID
Add an option for turning distinct off when querying review requests.
This adds a `distinct` option for `ReviewRequest.objects._query` and all wrapping functions, allowing callers to query review requests without distinct. When distinct is turned on (which is still the default for now), it can impact how queries are built, breaking `.count()` for instance. A future version of Review Board is likely to switch the default for `distinct` to `False`, but this will require further testing.
17c6766b40d83667fa05101698e8db75c85d4377
david
  1. Ship It!
  2. 
      
maubin
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-5.0.x (4b8473e)
Loading...