Merged in feature/textextraction (pull request #110)

Text Extraction

* bases

* go

* splitting

* structure

* movetoasync

* movetoasync

* settinguptrigger

* reorder

* storevent

* standardisepollingvalidation

* unittests

* fixlint

* fixlint

* awscfg

* generatesample

* followthrough

* tests

* clena

* store

* externalidcleanup

* clientid

* local

* baseunittests

* putobjecttests

* tests
This commit is contained in:
Michael McGuinness
2025-04-02 18:50:03 +00:00
parent e6a4cb3990
commit 81e7223560
226 changed files with 17283 additions and 2744 deletions
+17 -6
View File
@@ -4,17 +4,28 @@ SELECT EXISTS(
);
-- name: GetDocumentTextExtractionByHash :one
SELECT id, documentId, bucket, key, version, hash, cleanEntryId
FROM currentTextEntries
WHERE cleanEntryId = @cleanEntryId and hash = @hash;
SELECT id FROM currentTextEntries WHERE cleanId = @cleanEntryId and hash = @hash;
-- name: AddDocumentTextTrigger :one
INSERT INTO documentTextTriggerExtractions (cleanId, version) VALUES ($1, $2) returning id;
-- name: AddDocumentTextTriggerJobId :exec
UPDATE documentTextTriggerExtractions SET textractJobId = @textractJobId WHERE id = @id;
-- name: GetDocumentTextTrigger :one
SELECT dt.id, dt.cleanId, dt.version, dt.textractJobId, dc.documentId
from documentTextTriggerExtractions as dt
join documentCleans as dc on dt.cleanId = dc.id
where dt.id = @triggerId;
-- name: AddDocumentText :one
INSERT INTO documentTextExtractions (bucket, key, cleanEntryId, hash) VALUES ($1, $2, $3, $4) returning id;
INSERT INTO documentTextExtractions (bucket, key, hash) VALUES ($1, $2, $3) returning id;
-- name: AddDocumentTextEntry :exec
INSERT INTO documentTextExtractionEntries (textId, version) VALUES ($1, $2);
INSERT INTO documentTextExtractionEntries (textId, triggerId, version) VALUES ($1, $2, $3);
-- name: GetTextEntryByDocId :one
SELECT id, documentId, bucket, key, version, hash, cleanEntryId
SELECT id, documentId, bucket, key, hash, cleanId,
triggerId, textractJobId, triggerVersion, extractionVersion
FROM currentTextEntries
WHERE documentId = @documentId;