feat(store): query results and incidents for arbitrary time ranges
Refs #59 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
This commit is contained in:
1 parent
b3f19e20ad
commit
b210c8e5c0
5 files changed
+182
No files matched your search
@@ -89,3 +89,8 @@ SELECT * FROM incidents
|
||||
WHERE monitor_id = ANY (sqlc.arg(ids)::uuid[]) AND (resolved_at IS NULL OR resolved_at > sqlc.arg(since))
|
||||
ORDER BY started_at DESC
|
||||
LIMIT 50;
|
||||
|
||||
-- name: IncidentsSince :many
|
||||
-- Incidents overlapping the time since $1, for SLA calculation.
|
||||
SELECT monitor_id, started_at, resolved_at FROM incidents
|
||||
WHERE resolved_at IS NULL OR resolved_at > $1;
|
||||
Reference in new issue
Block a user