Merged in feature/doctextstructure (pull request #56)

DocTextRunner Structure

* firstround

* shorttests
This commit is contained in:
Michael McGuinness
2025-02-07 14:15:06 +00:00
parent 90353d8161
commit 24a038ec3d
41 changed files with 929 additions and 55 deletions
+10 -1
View File
@@ -9,4 +9,13 @@ SELECT EXISTS(
);
-- name: AddDocumentCleanEntry :exec
INSERT INTO documentCleans (documentId, version, bucket, key) VALUES ($1, $2, $3, $4);
INSERT INTO documentCleans (documentId, version, bucket, key) VALUES ($1, $2, $3, $4);
-- name: GetDocumentCleanEntry :one
SELECT dc.documentId, dc.bucket, dc.key
FROM documentCleans AS dc
JOIN documents AS d ON d.id = dc.documentId
JOIN collectors as c ON d.jobId = c.jobId
JOIN collectorCodeVersions as cv ON c.id = cv.collectorId
WHERE dc.documentId = $1 and dc.version >= cv.minCleanVersion
ORDER BY d.id DESC LIMIT 1;