reporter.currently_running (view)
|
This is a database view, not a base table. It has no triggers, indexes, or FK constraints of its own. Querying this view may be more efficient than joining the underlying tables directly. |
Columns
| Column | Type | Nullable | Notes |
|---|---|---|---|
id |
|
Yes |
|
runner_barcode |
|
Yes |
|
name |
|
Yes |
|
run_time |
|
Yes |
|
scheduled_wait_time |
|
Yes |
View Definition
SELECT s.id,
c.barcode AS runner_barcode,
r.name,
s.run_time,
s.run_time - now() AS scheduled_wait_time
FROM reporter.schedule s
JOIN reporter.report r ON r.id = s.report
JOIN actor.usr u ON s.runner = u.id
JOIN actor.card c ON c.id = u.card
WHERE s.start_time IS NOT NULL AND s.complete_time IS NULL;