Enable convenient typing of LocalSite-or-ALL parameters.
Review Request #13144 — Created July 13, 2023 and submitted
Review Board 5 introduced a
LocalSite.ALLvalue, which could be used
to query state without considering a
LocalSitevalue (as opposed to a
Nonevalue for the global site). This was a bit hard to type
correctly, and we ran the risk of different blocks of code attempting
their own typing.
This change introduces an
AnyOrAllLocalSitestype, which supports a
To make this work,
ALLneeded to be converted from a singleton object
to a value supported in
Literal. The safest approach was to use an
enum (which won't unintentionally cast to a string or integer in a
query). So we now have a private enum with only an
All unit tests pass.