feat(worker): prepare replay queries and audit schema
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
// Code generated by sqlc. DO NOT EDIT.
|
||||
// versions:
|
||||
// sqlc v1.31.1
|
||||
// source: attachment_replays.sql
|
||||
|
||||
package db
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
const createAttachmentReplay = `-- name: CreateAttachmentReplay :exec
|
||||
INSERT INTO attachment_replays (
|
||||
attachment_id,
|
||||
attempt,
|
||||
previous_error_code,
|
||||
operator,
|
||||
reason
|
||||
) VALUES (
|
||||
$1,
|
||||
$2,
|
||||
$3,
|
||||
$4,
|
||||
$5
|
||||
)
|
||||
`
|
||||
|
||||
type CreateAttachmentReplayParams struct {
|
||||
AttachmentID uuid.UUID
|
||||
Attempt int
|
||||
PreviousErrorCode *string
|
||||
Operator string
|
||||
Reason string
|
||||
}
|
||||
|
||||
func (q *Queries) CreateAttachmentReplay(ctx context.Context, arg CreateAttachmentReplayParams) error {
|
||||
_, err := q.db.Exec(ctx, createAttachmentReplay,
|
||||
arg.AttachmentID,
|
||||
arg.Attempt,
|
||||
arg.PreviousErrorCode,
|
||||
arg.Operator,
|
||||
arg.Reason,
|
||||
)
|
||||
return err
|
||||
}
|
||||
Reference in New Issue
Block a user