| 1 | // Code generated by sqlc. DO NOT EDIT. |
| 2 | // versions: |
| 3 | // sqlc v1.31.1 |
| 4 | // source: webhook_events_pending.sql |
| 5 | |
| 6 | package workerdb |
| 7 | |
| 8 | import ( |
| 9 | "context" |
| 10 | ) |
| 11 | |
| 12 | const insertWebhookEventPending = `-- name: InsertWebhookEventPending :one |
| 13 | |
| 14 | INSERT INTO webhook_events_pending (repo_id, event_kind, payload) |
| 15 | VALUES ($1, $2, $3) |
| 16 | RETURNING id, repo_id, event_kind, payload, created_at |
| 17 | ` |
| 18 | |
| 19 | type InsertWebhookEventPendingParams struct { |
| 20 | RepoID int64 |
| 21 | EventKind string |
| 22 | Payload []byte |
| 23 | } |
| 24 | |
| 25 | // SPDX-License-Identifier: AGPL-3.0-or-later |
| 26 | // |
| 27 | // The S33 webhook deliverer drains this. S14 only inserts; the |
| 28 | // accumulator is intentionally separate from the generic jobs table so |
| 29 | // S33 controls its own retry / batching / fan-out shape. |
| 30 | func (q *Queries) InsertWebhookEventPending(ctx context.Context, db DBTX, arg InsertWebhookEventPendingParams) (WebhookEventsPending, error) { |
| 31 | row := db.QueryRow(ctx, insertWebhookEventPending, arg.RepoID, arg.EventKind, arg.Payload) |
| 32 | var i WebhookEventsPending |
| 33 | err := row.Scan( |
| 34 | &i.ID, |
| 35 | &i.RepoID, |
| 36 | &i.EventKind, |
| 37 | &i.Payload, |
| 38 | &i.CreatedAt, |
| 39 | ) |
| 40 | return i, err |
| 41 | } |
| 42 |