Merged in feature/docresult (pull request #105)

Document Result Endpoint

* testing

* cleantesting

* progress

* query

* lint

* readme

* dockerclient

* api

* passtest

* tests

* test
This commit is contained in:
Michael McGuinness
2025-03-17 18:14:15 +00:00
parent f7c41c4ef3
commit 555b6d420b
105 changed files with 3276 additions and 2484 deletions
+8 -6
View File
@@ -11,8 +11,8 @@ import (
"github.com/jackc/pgx/v5/pgtype"
)
const addDocumentTextEntry = `-- name: AddDocumentTextEntry :exec
INSERT INTO documentTextExtractions (version, bucket, key, cleanEntryId) VALUES ($1, $2, $3, $4)
const addDocumentTextEntry = `-- name: AddDocumentTextEntry :one
INSERT INTO documentTextExtractions (version, bucket, key, cleanEntryId) VALUES ($1, $2, $3, $4) returning id
`
type AddDocumentTextEntryParams struct {
@@ -24,15 +24,17 @@ type AddDocumentTextEntryParams struct {
// AddDocumentTextEntry
//
// INSERT INTO documentTextExtractions (version, bucket, key, cleanEntryId) VALUES ($1, $2, $3, $4)
func (q *Queries) AddDocumentTextEntry(ctx context.Context, arg *AddDocumentTextEntryParams) error {
_, err := q.db.Exec(ctx, addDocumentTextEntry,
// INSERT INTO documentTextExtractions (version, bucket, key, cleanEntryId) VALUES ($1, $2, $3, $4) returning id
func (q *Queries) AddDocumentTextEntry(ctx context.Context, arg *AddDocumentTextEntryParams) (pgtype.UUID, error) {
row := q.db.QueryRow(ctx, addDocumentTextEntry,
arg.Version,
arg.Bucket,
arg.Key,
arg.Cleanentryid,
)
return err
var id pgtype.UUID
err := row.Scan(&id)
return id, err
}
const getTextEntryByDocId = `-- name: GetTextEntryByDocId :one