Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve timeseries ID retrival #46

Open
Tracked by #56
Lun4m opened this issue Dec 13, 2024 · 0 comments
Open
Tracked by #56

Improve timeseries ID retrival #46

Lun4m opened this issue Dec 13, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Lun4m
Copy link
Collaborator

Lun4m commented Dec 13, 2024

let query_get_obsinn = conn
.prepare(
"SELECT timeseries \
FROM labels.obsinn \
WHERE nationalnummer = $1 \
AND type_id = $2 \
AND param_code = $3 \
AND (($4::int IS NULL AND lvl IS NULL) OR (lvl = $4)) \
AND (($5::int IS NULL AND sensor IS NULL) OR (sensor = $5))",
)
.await?;

This query can return multiple values if for example a timeseries has been deactivated.
We need to either modify this query or the query_opt call to solve this problem.

@Lun4m Lun4m added the bug Something isn't working label Dec 14, 2024
@intarga intarga mentioned this issue Jan 7, 2025
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant