3d434eedb8
Job Status Get and DB tidy up * initalquery * tests * shorttests * testing queries * job * solvedthequery * updatingdb * fixingtests * repotests * shorttests * docker * testspassed
13 lines
417 B
SQL
13 lines
417 B
SQL
-- name: IsDocumentTextExtracted :one
|
|
SELECT EXISTS(
|
|
SELECT 1 FROM currentTextEntries WHERE documentId = @documentId
|
|
);
|
|
|
|
-- name: AddDocumentTextEntry :exec
|
|
INSERT INTO documentTextExtractions (version, bucket, key, cleanEntryId) VALUES ($1, $2, $3, $4);
|
|
|
|
-- name: GetDocumentTextEntry :one
|
|
SELECT id, documentId, bucket, key, version, cleanEntryId
|
|
FROM currentTextEntries
|
|
WHERE documentId = @documentId;
|