Implemented the weather forecast discussion product from weatherfeeder v0.8.3
All checks were successful
ci/woodpecker/push/build-image Pipeline was successful
All checks were successful
ci/woodpecker/push/build-image Pipeline was successful
This commit is contained in:
31
internal/adapters/outbound/postgres/discussion_queries.go
Normal file
31
internal/adapters/outbound/postgres/discussion_queries.go
Normal file
@@ -0,0 +1,31 @@
|
||||
// discussion_queries.go contains SQL text for forecast discussion reads.
|
||||
// Layer: adapters/outbound/postgres discussion feature.
|
||||
package postgres
|
||||
|
||||
const (
|
||||
queryLatestForecastDiscussion = `
|
||||
SELECT
|
||||
event_id,
|
||||
office_id,
|
||||
office_name,
|
||||
issued_at,
|
||||
updated_at,
|
||||
product,
|
||||
short_term_qualifier,
|
||||
short_term_issued_at,
|
||||
short_term_text,
|
||||
long_term_qualifier,
|
||||
long_term_issued_at,
|
||||
long_term_text
|
||||
FROM forecast_discussions
|
||||
ORDER BY issued_at DESC, event_emitted_at DESC
|
||||
LIMIT 1`
|
||||
|
||||
queryForecastDiscussionKeyMessages = `
|
||||
SELECT
|
||||
message_index,
|
||||
message_text
|
||||
FROM forecast_discussion_key_messages
|
||||
WHERE run_event_id = $1
|
||||
ORDER BY message_index ASC`
|
||||
)
|
||||
Reference in New Issue
Block a user