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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user