555b6d420b
Document Result Endpoint * testing * cleantesting * progress * query * lint * readme * dockerclient * api * passtest * tests * test
13 lines
428 B
SQL
13 lines
428 B
SQL
-- name: IsDocumentTextExtracted :one
|
|
SELECT EXISTS(
|
|
SELECT 1 FROM currentTextEntries WHERE documentId = @documentId
|
|
);
|
|
|
|
-- name: AddDocumentTextEntry :one
|
|
INSERT INTO documentTextExtractions (version, bucket, key, cleanEntryId) VALUES ($1, $2, $3, $4) returning id;
|
|
|
|
-- name: GetTextEntryByDocId :one
|
|
SELECT id, documentId, bucket, key, version, cleanEntryId
|
|
FROM currentTextEntries
|
|
WHERE documentId = @documentId;
|