-- name: SelectPendingUploadByGUID :one
SELECT * FROM pending_uploads WHERE guid = ? LIMIT 1;

-- name: InsertPendingUpload :one
INSERT INTO pending_uploads (
    site_id,
    guid,
    user_id,
    filename,
    file_size,
    mime_type,
    upload_started_at
) VALUES (?, ?, ?, ?, ?, ?, ?)
RETURNING id;

-- name: DeletePendingUpload :exec
DELETE FROM pending_uploads WHERE guid = ?;