| 1 | // Code generated by sqlc. DO NOT EDIT. |
| 2 | // versions: |
| 3 | // sqlc v1.31.1 |
| 4 | |
| 5 | package actionsdb |
| 6 | |
| 7 | import ( |
| 8 | "context" |
| 9 | |
| 10 | "github.com/jackc/pgx/v5/pgtype" |
| 11 | ) |
| 12 | |
| 13 | type Querier interface { |
| 14 | // SPDX-License-Identifier: AGPL-3.0-or-later |
| 15 | AppendStepLogChunk(ctx context.Context, db DBTX, arg AppendStepLogChunkParams) (AppendStepLogChunkRow, error) |
| 16 | DeleteExpiredArtifacts(ctx context.Context, db DBTX) ([]DeleteExpiredArtifactsRow, error) |
| 17 | DeleteExpiredRunnerJWTUses(ctx context.Context, db DBTX) error |
| 18 | DeleteOrgSecret(ctx context.Context, db DBTX, arg DeleteOrgSecretParams) error |
| 19 | DeleteOrgVariable(ctx context.Context, db DBTX, arg DeleteOrgVariableParams) error |
| 20 | DeleteRepoSecret(ctx context.Context, db DBTX, arg DeleteRepoSecretParams) error |
| 21 | DeleteRepoVariable(ctx context.Context, db DBTX, arg DeleteRepoVariableParams) error |
| 22 | DeleteStepLogChunks(ctx context.Context, db DBTX, stepID int64) error |
| 23 | // Idempotent insert: if a row with the same (repo_id, workflow_file, |
| 24 | // trigger_event_id) already exists, returns no rows (pgx.ErrNoRows in |
| 25 | // Go). The handler treats that as a successful no-op so worker |
| 26 | // retries and admin replays of the same triggering event don't |
| 27 | // duplicate runs. |
| 28 | // |
| 29 | // The ON CONFLICT predicate matches the partial unique index defined |
| 30 | // in migration 0051; both must agree for postgres to infer the |
| 31 | // target. |
| 32 | EnqueueWorkflowRun(ctx context.Context, db DBTX, arg EnqueueWorkflowRunParams) (WorkflowRun, error) |
| 33 | GetArtifactByID(ctx context.Context, db DBTX, id int64) (WorkflowArtifact, error) |
| 34 | GetOrgSecret(ctx context.Context, db DBTX, arg GetOrgSecretParams) (GetOrgSecretRow, error) |
| 35 | GetOrgVariable(ctx context.Context, db DBTX, arg GetOrgVariableParams) (GetOrgVariableRow, error) |
| 36 | GetRepoSecret(ctx context.Context, db DBTX, arg GetRepoSecretParams) (GetRepoSecretRow, error) |
| 37 | GetRepoVariable(ctx context.Context, db DBTX, arg GetRepoVariableParams) (GetRepoVariableRow, error) |
| 38 | GetRunnerByID(ctx context.Context, db DBTX, id int64) (WorkflowRunner, error) |
| 39 | GetRunnerByName(ctx context.Context, db DBTX, name string) (WorkflowRunner, error) |
| 40 | GetRunnerByTokenHash(ctx context.Context, db DBTX, tokenHash []byte) (GetRunnerByTokenHashRow, error) |
| 41 | GetWorkflowJobByID(ctx context.Context, db DBTX, id int64) (WorkflowJob, error) |
| 42 | GetWorkflowRunByID(ctx context.Context, db DBTX, id int64) (WorkflowRun, error) |
| 43 | GetWorkflowStepByID(ctx context.Context, db DBTX, id int64) (WorkflowStep, error) |
| 44 | // SPDX-License-Identifier: AGPL-3.0-or-later |
| 45 | InsertArtifact(ctx context.Context, db DBTX, arg InsertArtifactParams) (WorkflowArtifact, error) |
| 46 | // SPDX-License-Identifier: AGPL-3.0-or-later |
| 47 | InsertRunner(ctx context.Context, db DBTX, arg InsertRunnerParams) (WorkflowRunner, error) |
| 48 | InsertRunnerToken(ctx context.Context, db DBTX, arg InsertRunnerTokenParams) (RunnerToken, error) |
| 49 | // SPDX-License-Identifier: AGPL-3.0-or-later |
| 50 | InsertWorkflowJob(ctx context.Context, db DBTX, arg InsertWorkflowJobParams) (WorkflowJob, error) |
| 51 | // SPDX-License-Identifier: AGPL-3.0-or-later |
| 52 | InsertWorkflowRun(ctx context.Context, db DBTX, arg InsertWorkflowRunParams) (WorkflowRun, error) |
| 53 | // SPDX-License-Identifier: AGPL-3.0-or-later |
| 54 | InsertWorkflowStep(ctx context.Context, db DBTX, arg InsertWorkflowStepParams) (WorkflowStep, error) |
| 55 | ListArtifactsForRun(ctx context.Context, db DBTX, runID int64) ([]ListArtifactsForRunRow, error) |
| 56 | ListJobsForRun(ctx context.Context, db DBTX, runID int64) ([]ListJobsForRunRow, error) |
| 57 | ListOrgSecrets(ctx context.Context, db DBTX, orgID pgtype.Int8) ([]ListOrgSecretsRow, error) |
| 58 | ListOrgVariables(ctx context.Context, db DBTX, orgID pgtype.Int8) ([]ListOrgVariablesRow, error) |
| 59 | ListRepoSecrets(ctx context.Context, db DBTX, repoID pgtype.Int8) ([]ListRepoSecretsRow, error) |
| 60 | ListRepoVariables(ctx context.Context, db DBTX, repoID pgtype.Int8) ([]ListRepoVariablesRow, error) |
| 61 | ListRunners(ctx context.Context, db DBTX) ([]ListRunnersRow, error) |
| 62 | ListStepLogChunks(ctx context.Context, db DBTX, arg ListStepLogChunksParams) ([]WorkflowStepLogChunk, error) |
| 63 | ListStepsForJob(ctx context.Context, db DBTX, jobID int64) ([]ListStepsForJobRow, error) |
| 64 | ListWorkflowRunsForRepo(ctx context.Context, db DBTX, arg ListWorkflowRunsForRepoParams) ([]ListWorkflowRunsForRepoRow, error) |
| 65 | // Companion to EnqueueWorkflowRun for the conflict path: when an |
| 66 | // INSERT ... ON CONFLICT DO NOTHING returns no rows, the trigger |
| 67 | // handler uses this to find the existing row so it can surface a |
| 68 | // stable RunID. Matches the partial-unique index from migration 0051. |
| 69 | LookupWorkflowRunByTriggerEvent(ctx context.Context, db DBTX, arg LookupWorkflowRunByTriggerEventParams) (WorkflowRun, error) |
| 70 | // SPDX-License-Identifier: AGPL-3.0-or-later |
| 71 | MarkRunnerJWTUsed(ctx context.Context, db DBTX, arg MarkRunnerJWTUsedParams) (RunnerJwtUsed, error) |
| 72 | // Atomic next-index emitter: take the max + 1 for this repo. Pairs |
| 73 | // with the (repo_id, run_index) UNIQUE so concurrent inserts that |
| 74 | // race here will catch a unique-violation and the caller retries. |
| 75 | // Cast to bigint so sqlc generates int64 (the column type) rather |
| 76 | // than int32 (the type the +1 literal would default to). |
| 77 | NextRunIndexForRepo(ctx context.Context, db DBTX, repoID int64) (int64, error) |
| 78 | RevokeAllTokensForRunner(ctx context.Context, db DBTX, runnerID int64) error |
| 79 | TouchRunnerHeartbeat(ctx context.Context, db DBTX, arg TouchRunnerHeartbeatParams) error |
| 80 | UpsertOrgSecret(ctx context.Context, db DBTX, arg UpsertOrgSecretParams) (WorkflowSecret, error) |
| 81 | UpsertOrgVariable(ctx context.Context, db DBTX, arg UpsertOrgVariableParams) (ActionsVariable, error) |
| 82 | // SPDX-License-Identifier: AGPL-3.0-or-later |
| 83 | UpsertRepoSecret(ctx context.Context, db DBTX, arg UpsertRepoSecretParams) (WorkflowSecret, error) |
| 84 | // SPDX-License-Identifier: AGPL-3.0-or-later |
| 85 | UpsertRepoVariable(ctx context.Context, db DBTX, arg UpsertRepoVariableParams) (ActionsVariable, error) |
| 86 | } |
| 87 | |
| 88 | var _ Querier = (*Queries)(nil) |
| 89 |