Open
Description
With #1070 we now support time_value=*
and issue=*
in covidcast requests, which prevents users from having to specify ridiculous ranges like 11111111-99999999 in their queries. But if a user wants an open-ended portion of the complete calendar or history, they still have to put in silly values.
Could we support inequalities like the below?
- all issues on or before some date
- all issues on or after some date
- all time_values on or before some date
- all time_values on or after some date
I'm not sure what a good syntax would be. Some ideas are:
<YYYYmmdd
<=YYYYmmdd
>YYYYmmdd
>=YYYYmmdd
*-YYYYmmdd
YYYYmmdd-*
We'd then have the following mapping to SQL queries:
meaning | parameter syntax | SQL |
---|---|---|
one date | YYYYmmdd or YYYY-mm-dd |
issue = YYYYmmdd or time_value = YYYYmmdd |
range | YYYYmmdd-YYYYmmdd or YYYY-mm-dd--YYYY-mm-dd |
issue BETWEEN YYYYmmdd AND YYYYmmdd or time_value BETWEEN YYYYmmdd AND YYYYmmdd |
any | * |
issue or time_value not included in WHERE clause |
open-ended | TBD | issue < YYYYmmdd or issue <= YYYYmmdd or issue > YYYYmmdd or issue >= YYYYmmdd or similar for time_value |