stillbox/sql/postgres/queries/calls.sql

28 lines
522 B
MySQL
Raw Normal View History

2024-07-15 22:30:32 -04:00
-- name: AddCall :one
INSERT INTO calls (
id,
submitter,
system,
talkgroup,
2024-07-16 19:35:16 -04:00
call_date,
2024-07-15 22:30:32 -04:00
audio_name,
audio_blob,
audio_type,
audio_url,
2024-08-11 13:46:43 -04:00
duration,
2024-07-16 19:31:30 -04:00
frequency,
2024-07-15 22:30:32 -04:00
frequencies,
patches,
tg_label,
2024-08-23 14:28:47 -04:00
tg_alpha_tag,
2024-07-27 19:25:16 -04:00
tg_group,
2024-07-15 22:30:32 -04:00
source
2024-08-11 13:46:43 -04:00
) VALUES (gen_random_uuid(), $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16)
RETURNING id;
2024-07-16 19:31:30 -04:00
2024-07-17 19:33:09 -04:00
-- name: SetCallTranscript :exec
2024-07-16 19:31:30 -04:00
UPDATE calls SET transcript = $2 WHERE id = $1;
2024-10-20 12:26:32 -04:00
-- name: GetCallsTableSize :one
SELECT pg_size_pretty(pg_total_relation_size('calls'));