Hi,
I am building a read REST API for timescale. It is currently using sqlx
crate to run traditionnal SQL queries.
I would like to add downsampling to the queries. Saddly, sqlx
can not run timescale specific function like lttb()
or asap_smooth()
.
SELECT (time, value) FROM
unnest((
SELECT lttb(time, <some sensor field>, 100) FROM <some table> WHERE
objectId=<some id>
AND time BETWEEN <start_timestamp> AND <end_timestamp>
))
Is there a way to run this kind of query in a Rust API?
Thanks