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
+4 -10
View File
@@ -20,21 +20,15 @@ namedResults AS (
)
SELECT
d.id,
c.externalId AS clientId,
d.clientId,
d.hash,
COALESCE(jsonb_object_agg(r.name, r.value) FILTER (WHERE r.name IS NOT NULL), '{}') AS fields
FROM docs AS d
JOIN clients AS c ON c.id = d.clientId
LEFT JOIN namedResults AS r ON d.id = r.id
GROUP BY d.id, c.externalId, d.hash;
GROUP BY d.id, d.clientId, d.hash;
-- name: ListDocumentsByClientExternalId :many
WITH client as (
SELECT id from clients where externalId = @clientId
)
SELECT d.id, d.hash
from documents as d
JOIN client as c on d.clientId = c.id;
-- name: ListDocumentsByClient :many
SELECT id, hash from documents where clientId = @clientId;
-- name: CreateDocument :one
INSERT INTO documents (clientId, hash) VALUES ($1, $2) RETURNING id;