You've already forked agentic-coding-workflow
feat(jobs/runners): attachment cleanup + chat DeleteAttachments query/method
This commit is contained in:
@@ -34,6 +34,15 @@ func (q *Queries) DeleteAttachment(ctx context.Context, id pgtype.UUID) error {
|
||||
return err
|
||||
}
|
||||
|
||||
const deleteAttachmentsByIDs = `-- name: DeleteAttachmentsByIDs :exec
|
||||
DELETE FROM message_attachments WHERE id = ANY($1::uuid[])
|
||||
`
|
||||
|
||||
func (q *Queries) DeleteAttachmentsByIDs(ctx context.Context, dollar_1 []pgtype.UUID) error {
|
||||
_, err := q.db.Exec(ctx, deleteAttachmentsByIDs, dollar_1)
|
||||
return err
|
||||
}
|
||||
|
||||
const getAttachment = `-- name: GetAttachment :one
|
||||
SELECT id, user_id, message_id, filename, mime_type, size_bytes, sha256, storage_path, created_at FROM message_attachments WHERE id = $1
|
||||
`
|
||||
|
||||
Reference in New Issue
Block a user