Compare commits

...

2 commits

2 changed files with 14 additions and 3 deletions

View file

@ -43,7 +43,18 @@ WHERE
user_id = :uid
;
-- name: delete-file!
-- name: delete-file#
DELETE FROM jobs
WHERE
user_uid = :uid
AND file_id = :fid
;
DELETE FROM file_analysis
WHERE
file_id = :fid
;
DELETE FROM files
WHERE
user_id = :uid

View file

@ -58,12 +58,12 @@ WHERE
-- name: list-jobs-by-file
SELECT
*
finished_at
, (SELECT name FROM job_statuses WHERE id = j.status_id) AS `status`
FROM jobs
WHERE
file_id = :fid
, uid = :uid
AND uid = :uid
;
-- name: list-job-queue