5b7160fe44
Job Collector * createstructure * mostupdatevalidation * repocollectorupdate * updateoutline * updatevalidation * scriptupdate * cleanupdockerignore * update * collectorupdateapi
9 lines
413 B
SQL
9 lines
413 B
SQL
-- name: ListResultsByDocumentID :many
|
|
SELECT id, queryId, queryVersion FROM results
|
|
where documentId = $1 and cleanVersion >= $2 and textVersion >= $3;
|
|
|
|
-- name: ListResultValuesByID :many
|
|
SELECT id, queryId, value FROM results where id = ANY($1);
|
|
|
|
-- name: SetResult :one
|
|
INSERT INTO results (queryId, documentId, value, cleanVersion, textVersion, queryVersion) VALUES ($1, $2, $3, $4, $5, $6) RETURNING id; |