Merged in feature/support-more-types (pull request #219)
support new types for import * tests pass * missing file * bug fixes
This commit is contained in:
@@ -568,6 +568,23 @@ func (q *Queries) ResolveBatchDocumentOutcome(ctx context.Context, arg *ResolveB
|
||||
return err
|
||||
}
|
||||
|
||||
const setBatchTotalDocuments = `-- name: SetBatchTotalDocuments :exec
|
||||
UPDATE batch_uploads SET total_documents = $2 WHERE id = $1
|
||||
`
|
||||
|
||||
type SetBatchTotalDocumentsParams struct {
|
||||
ID uuid.UUID `db:"id"`
|
||||
TotalDocuments int32 `db:"total_documents"`
|
||||
}
|
||||
|
||||
// SetBatchTotalDocuments
|
||||
//
|
||||
// UPDATE batch_uploads SET total_documents = $2 WHERE id = $1
|
||||
func (q *Queries) SetBatchTotalDocuments(ctx context.Context, arg *SetBatchTotalDocumentsParams) error {
|
||||
_, err := q.db.Exec(ctx, setBatchTotalDocuments, arg.ID, arg.TotalDocuments)
|
||||
return err
|
||||
}
|
||||
|
||||
const updateBatchDocumentOutcomeByDocumentID = `-- name: UpdateBatchDocumentOutcomeByDocumentID :exec
|
||||
UPDATE batch_document_outcomes
|
||||
SET outcome = $2::batch_outcome_status,
|
||||
@@ -600,9 +617,9 @@ func (q *Queries) UpdateBatchDocumentOutcomeByDocumentID(ctx context.Context, ar
|
||||
}
|
||||
|
||||
const updateBatchProgress = `-- name: UpdateBatchProgress :exec
|
||||
UPDATE batch_uploads
|
||||
SET processed_documents = $2,
|
||||
failed_documents = $3,
|
||||
UPDATE batch_uploads
|
||||
SET processed_documents = $2,
|
||||
failed_documents = $3,
|
||||
invalid_type_documents = $4,
|
||||
progress_percent = $5
|
||||
WHERE id = $1
|
||||
|
||||
Reference in New Issue
Block a user