sse + ocr replanish

This commit is contained in:
m
2026-07-29 18:56:26 +02:00
parent 68a4beef37
commit 397803fb96
14 changed files with 386 additions and 26 deletions
+22
View File
@@ -0,0 +1,22 @@
-- name: CreateOCRJob :one
INSERT INTO ocr_jobs (resource_id, file_path, status)
VALUES ($1, $2, 'pending')
RETURNING *;
-- name: GetOCRJob :one
SELECT * FROM ocr_jobs
WHERE id = $1 LIMIT 1;
-- name: ListPendingOCRJobs :many
SELECT * FROM ocr_jobs
WHERE status = 'pending'
ORDER BY created_at ASC;
-- name: UpdateOCRJobStatus :exec
UPDATE ocr_jobs
SET status = $1, error_message = $2, updated_at = CURRENT_TIMESTAMP
WHERE id = $3;
-- name: DeleteOCRJob :exec
DELETE FROM ocr_jobs
WHERE id = $1;