| 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 | CancelOpenWorkflowStepsForJob(ctx context.Context, db DBTX, jobID int64) ([]WorkflowStep, error) |
| 17 | ClaimQueuedWorkflowJob(ctx context.Context, db DBTX, arg ClaimQueuedWorkflowJobParams) (ClaimQueuedWorkflowJobRow, error) |
| 18 | CompleteWorkflowRun(ctx context.Context, db DBTX, arg CompleteWorkflowRunParams) (WorkflowRun, error) |
| 19 | CountRunningJobsForRunner(ctx context.Context, db DBTX, runnerID int64) (int32, error) |
| 20 | CountWorkflowRunsForRepo(ctx context.Context, db DBTX, arg CountWorkflowRunsForRepoParams) (int64, error) |
| 21 | DeleteOldRunnerJWTUsesForCleanup(ctx context.Context, db DBTX, expiresAt pgtype.Timestamptz) (int64, error) |
| 22 | DeleteOldWorkflowRunsForCleanup(ctx context.Context, db DBTX, completedAt pgtype.Timestamptz) (int64, error) |
| 23 | DeleteOrgSecret(ctx context.Context, db DBTX, arg DeleteOrgSecretParams) error |
| 24 | DeleteOrgVariable(ctx context.Context, db DBTX, arg DeleteOrgVariableParams) error |
| 25 | DeleteRepoSecret(ctx context.Context, db DBTX, arg DeleteRepoSecretParams) error |
| 26 | DeleteRepoVariable(ctx context.Context, db DBTX, arg DeleteRepoVariableParams) error |
| 27 | DeleteStaleStepLogChunksForCleanup(ctx context.Context, db DBTX, completedAt pgtype.Timestamptz) (int64, error) |
| 28 | DeleteStepLogChunks(ctx context.Context, db DBTX, stepID int64) error |
| 29 | DeleteWorkflowArtifactsByIDs(ctx context.Context, db DBTX, dollar_1 []int64) (int64, error) |
| 30 | // Idempotent insert: if a row with the same (repo_id, workflow_file, |
| 31 | // trigger_event_id) already exists, returns no rows (pgx.ErrNoRows in |
| 32 | // Go). The handler treats that as a successful no-op so worker |
| 33 | // retries and admin replays of the same triggering event don't |
| 34 | // duplicate runs. |
| 35 | // |
| 36 | // The ON CONFLICT predicate matches the partial unique index defined |
| 37 | // in migration 0051; both must agree for postgres to infer the |
| 38 | // target. |
| 39 | EnqueueWorkflowRun(ctx context.Context, db DBTX, arg EnqueueWorkflowRunParams) (WorkflowRun, error) |
| 40 | GetArtifactByID(ctx context.Context, db DBTX, id int64) (WorkflowArtifact, error) |
| 41 | GetFirstStepForJob(ctx context.Context, db DBTX, jobID int64) (WorkflowStep, error) |
| 42 | GetOrgSecret(ctx context.Context, db DBTX, arg GetOrgSecretParams) (GetOrgSecretRow, error) |
| 43 | GetOrgVariable(ctx context.Context, db DBTX, arg GetOrgVariableParams) (GetOrgVariableRow, error) |
| 44 | GetRepoSecret(ctx context.Context, db DBTX, arg GetRepoSecretParams) (GetRepoSecretRow, error) |
| 45 | GetRepoVariable(ctx context.Context, db DBTX, arg GetRepoVariableParams) (GetRepoVariableRow, error) |
| 46 | GetRunnerByID(ctx context.Context, db DBTX, id int64) (WorkflowRunner, error) |
| 47 | GetRunnerByName(ctx context.Context, db DBTX, name string) (WorkflowRunner, error) |
| 48 | GetRunnerByTokenHash(ctx context.Context, db DBTX, tokenHash []byte) (GetRunnerByTokenHashRow, error) |
| 49 | GetStepLogChunkBefore(ctx context.Context, db DBTX, arg GetStepLogChunkBeforeParams) (WorkflowStepLogChunk, error) |
| 50 | GetStepLogChunkByStepSeq(ctx context.Context, db DBTX, arg GetStepLogChunkByStepSeqParams) (WorkflowStepLogChunk, error) |
| 51 | GetWorkflowJobByID(ctx context.Context, db DBTX, id int64) (WorkflowJob, error) |
| 52 | GetWorkflowJobSecretMask(ctx context.Context, db DBTX, jobID int64) (WorkflowJobSecretMask, error) |
| 53 | GetWorkflowRunByID(ctx context.Context, db DBTX, id int64) (WorkflowRun, error) |
| 54 | GetWorkflowRunForRepoByIndex(ctx context.Context, db DBTX, arg GetWorkflowRunForRepoByIndexParams) (GetWorkflowRunForRepoByIndexRow, error) |
| 55 | GetWorkflowStepByID(ctx context.Context, db DBTX, id int64) (WorkflowStep, error) |
| 56 | HeartbeatRunner(ctx context.Context, db DBTX, arg HeartbeatRunnerParams) (WorkflowRunner, error) |
| 57 | // SPDX-License-Identifier: AGPL-3.0-or-later |
| 58 | InsertArtifact(ctx context.Context, db DBTX, arg InsertArtifactParams) (WorkflowArtifact, error) |
| 59 | // SPDX-License-Identifier: AGPL-3.0-or-later |
| 60 | InsertRunner(ctx context.Context, db DBTX, arg InsertRunnerParams) (WorkflowRunner, error) |
| 61 | InsertRunnerToken(ctx context.Context, db DBTX, arg InsertRunnerTokenParams) (RunnerToken, error) |
| 62 | // SPDX-License-Identifier: AGPL-3.0-or-later |
| 63 | InsertWorkflowJob(ctx context.Context, db DBTX, arg InsertWorkflowJobParams) (WorkflowJob, error) |
| 64 | // SPDX-License-Identifier: AGPL-3.0-or-later |
| 65 | InsertWorkflowRun(ctx context.Context, db DBTX, arg InsertWorkflowRunParams) (WorkflowRun, error) |
| 66 | // SPDX-License-Identifier: AGPL-3.0-or-later |
| 67 | InsertWorkflowStep(ctx context.Context, db DBTX, arg InsertWorkflowStepParams) (WorkflowStep, error) |
| 68 | ListActiveWorkflowRunsForAdmin(ctx context.Context, db DBTX, arg ListActiveWorkflowRunsForAdminParams) ([]WorkflowRun, error) |
| 69 | ListAllStepLogChunksForStep(ctx context.Context, db DBTX, stepID int64) ([]WorkflowStepLogChunk, error) |
| 70 | ListArtifactsForRun(ctx context.Context, db DBTX, runID int64) ([]ListArtifactsForRunRow, error) |
| 71 | // Older queued/running runs with the same group block the new run while they |
| 72 | // still have at least one queued/running job that has not already received a |
| 73 | // cancel request. cancel-in-progress releases the slot by flipping that job |
| 74 | // flag even if the runner is still draining the old container. |
| 75 | ListBlockingConcurrencyRunsForUpdate(ctx context.Context, db DBTX, arg ListBlockingConcurrencyRunsForUpdateParams) ([]WorkflowRun, error) |
| 76 | ListExpiredWorkflowArtifactsForCleanup(ctx context.Context, db DBTX, arg ListExpiredWorkflowArtifactsForCleanupParams) ([]ListExpiredWorkflowArtifactsForCleanupRow, error) |
| 77 | ListJobsForRun(ctx context.Context, db DBTX, runID int64) ([]ListJobsForRunRow, error) |
| 78 | ListOrgSecrets(ctx context.Context, db DBTX, orgID pgtype.Int8) ([]ListOrgSecretsRow, error) |
| 79 | ListOrgVariables(ctx context.Context, db DBTX, orgID pgtype.Int8) ([]ListOrgVariablesRow, error) |
| 80 | ListRepoSecrets(ctx context.Context, db DBTX, repoID pgtype.Int8) ([]ListRepoSecretsRow, error) |
| 81 | ListRepoVariables(ctx context.Context, db DBTX, repoID pgtype.Int8) ([]ListRepoVariablesRow, error) |
| 82 | ListRunnerStepsForJob(ctx context.Context, db DBTX, jobID int64) ([]ListRunnerStepsForJobRow, error) |
| 83 | ListRunners(ctx context.Context, db DBTX) ([]ListRunnersRow, error) |
| 84 | ListStepLogChunks(ctx context.Context, db DBTX, arg ListStepLogChunksParams) ([]WorkflowStepLogChunk, error) |
| 85 | ListStepsForJob(ctx context.Context, db DBTX, jobID int64) ([]ListStepsForJobRow, error) |
| 86 | ListWorkflowRunWorkflowsForRepo(ctx context.Context, db DBTX, repoID int64) ([]ListWorkflowRunWorkflowsForRepoRow, error) |
| 87 | ListWorkflowRunsForRepo(ctx context.Context, db DBTX, arg ListWorkflowRunsForRepoParams) ([]ListWorkflowRunsForRepoRow, error) |
| 88 | LockRunnerByID(ctx context.Context, db DBTX, id int64) (WorkflowRunner, error) |
| 89 | // Companion to EnqueueWorkflowRun for the conflict path: when an |
| 90 | // INSERT ... ON CONFLICT DO NOTHING returns no rows, the trigger |
| 91 | // handler uses this to find the existing row so it can surface a |
| 92 | // stable RunID. Matches the partial-unique index from migration 0051. |
| 93 | LookupWorkflowRunByTriggerEvent(ctx context.Context, db DBTX, arg LookupWorkflowRunByTriggerEventParams) (WorkflowRun, error) |
| 94 | // SPDX-License-Identifier: AGPL-3.0-or-later |
| 95 | MarkRunnerJWTUsed(ctx context.Context, db DBTX, arg MarkRunnerJWTUsedParams) (RunnerJwtUsed, error) |
| 96 | MarkWorkflowRunRunning(ctx context.Context, db DBTX, id int64) error |
| 97 | // Atomic next-index emitter: take the max + 1 for this repo. Pairs |
| 98 | // with the (repo_id, run_index) UNIQUE so concurrent inserts that |
| 99 | // race here will catch a unique-violation and the caller retries. |
| 100 | // Cast to bigint so sqlc generates int64 (the column type) rather |
| 101 | // than int32 (the type the +1 literal would default to). |
| 102 | NextRunIndexForRepo(ctx context.Context, db DBTX, repoID int64) (int64, error) |
| 103 | RequestWorkflowJobCancel(ctx context.Context, db DBTX, id int64) (WorkflowJob, error) |
| 104 | RequestWorkflowRunCancel(ctx context.Context, db DBTX, runID int64) ([]WorkflowJob, error) |
| 105 | RevokeAllTokensForRunner(ctx context.Context, db DBTX, runnerID int64) error |
| 106 | StartWorkflowRun(ctx context.Context, db DBTX, id int64) (WorkflowRun, error) |
| 107 | TouchRunnerHeartbeat(ctx context.Context, db DBTX, arg TouchRunnerHeartbeatParams) error |
| 108 | UpdateStepLogChunk(ctx context.Context, db DBTX, arg UpdateStepLogChunkParams) error |
| 109 | UpdateWorkflowJobStatus(ctx context.Context, db DBTX, arg UpdateWorkflowJobStatusParams) (WorkflowJob, error) |
| 110 | UpdateWorkflowStepLogObject(ctx context.Context, db DBTX, arg UpdateWorkflowStepLogObjectParams) (WorkflowStep, error) |
| 111 | UpdateWorkflowStepStatus(ctx context.Context, db DBTX, arg UpdateWorkflowStepStatusParams) (WorkflowStep, error) |
| 112 | UpsertOrgSecret(ctx context.Context, db DBTX, arg UpsertOrgSecretParams) (WorkflowSecret, error) |
| 113 | UpsertOrgVariable(ctx context.Context, db DBTX, arg UpsertOrgVariableParams) (ActionsVariable, error) |
| 114 | // SPDX-License-Identifier: AGPL-3.0-or-later |
| 115 | UpsertRepoSecret(ctx context.Context, db DBTX, arg UpsertRepoSecretParams) (WorkflowSecret, error) |
| 116 | // SPDX-License-Identifier: AGPL-3.0-or-later |
| 117 | UpsertRepoVariable(ctx context.Context, db DBTX, arg UpsertRepoVariableParams) (ActionsVariable, error) |
| 118 | // SPDX-License-Identifier: AGPL-3.0-or-later |
| 119 | UpsertWorkflowJobSecretMask(ctx context.Context, db DBTX, arg UpsertWorkflowJobSecretMaskParams) error |
| 120 | } |
| 121 | |
| 122 | var _ Querier = (*Queries)(nil) |
| 123 |