Added new endpoints under /forecast/narrative
All checks were successful
ci/woodpecker/push/build-image Pipeline was successful

This commit is contained in:
2026-03-27 22:39:17 -05:00
parent 78dc7817e9
commit 291a9178c8
10 changed files with 360 additions and 19 deletions

View File

@@ -1,4 +1,4 @@
// forecast_queries.go contains SQL text for hourly forecast reads.
// forecast_queries.go contains SQL text for forecast reads.
// Layer: adapters/outbound/postgres forecast feature.
package postgres
@@ -17,6 +17,22 @@ SELECT
FROM forecasts
WHERE product = 'hourly'
ORDER BY issued_at DESC, event_emitted_at DESC
LIMIT 1`
queryLatestNarrativeForecast = `
SELECT
event_id,
location_id,
location_name,
issued_at,
updated_at,
product,
latitude,
longitude,
elevation_meters
FROM forecasts
WHERE product = 'narrative'
ORDER BY issued_at DESC, event_emitted_at DESC
LIMIT 1`
queryForecastPeriods = `