Add convective outlook Postgres read adapter

This commit is contained in:
2026-06-11 15:33:26 +00:00
parent 6e0b71f6f4
commit 63c8f33a2a
5 changed files with 413 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
// outlooks_queries.go contains SQL text for outlook reads.
// Layer: adapters/outbound/postgres outlook feature.
package postgres
const (
queryLatestConvectiveOutlookRun = `
SELECT
event_id,
location_id,
location_name,
latitude,
longitude,
as_of,
issued_at
FROM outlook_runs
ORDER BY as_of DESC, event_emitted_at DESC
LIMIT 1`
queryOutlooksForRun = `
SELECT
outlook_index,
outlook_id,
provider,
product,
day,
outlook_type,
label,
label_text,
severity_rank,
valid_from,
valid_to,
issued_at,
expires_at,
forecaster,
headline,
summary,
discussion,
source_url,
image_url,
contains_location,
geometry_json
FROM outlooks
WHERE run_event_id = $1
ORDER BY outlook_index ASC`
)