Merged in feature/docinit (pull request #48)

Feature/docinit

* createunittests

* cleanup

* skip

* cleanup
This commit is contained in:
Michael McGuinness
2025-02-05 17:44:01 +00:00
parent 92334ad1dd
commit 5c253b3592
28 changed files with 536 additions and 101 deletions
+8 -2
View File
@@ -1,5 +1,11 @@
-- name: GetDocument :one
SELECT id, jobId, hash, location FROM documents WHERE id = $1 LIMIT 1;
SELECT id, jobId, hash FROM documents WHERE id = $1 LIMIT 1;
-- name: CreateDocument :one
INSERT INTO documents (jobId, hash, location) VALUES ($1, $2, $3) RETURNING id;
INSERT INTO documents (jobId, hash) VALUES ($1, $2) RETURNING id;
-- name: AddDocumentEntry :exec
INSERT INTO documentEntries (documentId, bucket, location) VALUES ($1, $2, $3);
-- name: GetDocumentIDByHash :one
SELECT id FROM documents WHERE hash = $1 and jobId = $2;