Merged in feature/add-deletes (pull request #214)
support delete for client, document and folder * support delete for client, document and folder * remove batch cancel conflict not used Approved-by: Jacob Mathison
This commit is contained in:
@@ -33,29 +33,6 @@ func (q *Queries) AddFailedFilename(ctx context.Context, arg *AddFailedFilenameP
|
||||
return err
|
||||
}
|
||||
|
||||
const cancelBatchUpload = `-- name: CancelBatchUpload :exec
|
||||
UPDATE batch_uploads
|
||||
SET status = 'cancelled',
|
||||
completed_at = NOW()
|
||||
WHERE id = $1 AND client_id = $2 AND status = 'processing'
|
||||
`
|
||||
|
||||
type CancelBatchUploadParams struct {
|
||||
ID uuid.UUID `db:"id"`
|
||||
ClientID string `db:"client_id"`
|
||||
}
|
||||
|
||||
// CancelBatchUpload
|
||||
//
|
||||
// UPDATE batch_uploads
|
||||
// SET status = 'cancelled',
|
||||
// completed_at = NOW()
|
||||
// WHERE id = $1 AND client_id = $2 AND status = 'processing'
|
||||
func (q *Queries) CancelBatchUpload(ctx context.Context, arg *CancelBatchUploadParams) error {
|
||||
_, err := q.db.Exec(ctx, cancelBatchUpload, arg.ID, arg.ClientID)
|
||||
return err
|
||||
}
|
||||
|
||||
const countDocumentsByBatchId = `-- name: CountDocumentsByBatchId :one
|
||||
SELECT COUNT(*) as count
|
||||
FROM documents
|
||||
|
||||
Reference in New Issue
Block a user