I'm using React-Admin + ra-data-postgrest + PostgREST + PgSQL to view very large table. Queries to this table MUST be restricted to predefined maximum time range.
I was able to implement time range filter using two DateTimeInputs and PostgREST operators @lte and @gte (source for DateTimeInputs was tstmp@lte and tstmp@gte respectively), but the UX is not very good.
Now I'm trying to improve this solution to use only one DateTimeInput (label Timestamp) and one SelectInput (label Interval) with predefined time intervals: 10s,15s,30s,60s,1min,3min,5min,10min,15min...
But I'm not able to transform the predefined time interval into valid tstmp@gte query value. I can access DateTimeInput timestamp value using useListContext(), I can then translate time interval value into timestamp value for tstmp@gte operator, but I have no idea how to get this calculated value into PostgREST dataProvider query.
Any idea how to do this?