Go · 2769 bytes Raw Blame History
1 // Code generated by sqlc. DO NOT EDIT.
2 // versions:
3 // sqlc v1.31.1
4
5 package checksdb
6
7 import (
8 "context"
9 )
10
11 type Querier interface {
12 CreateCheckRun(ctx context.Context, db DBTX, arg CreateCheckRunParams) (CheckRun, error)
13 GetCheckRun(ctx context.Context, db DBTX, id int64) (CheckRun, error)
14 // ─── check_runs ──────────────────────────────────────────────────────
15 // External-system create dedupe: lookup by (repo, head_sha, name,
16 // external_id). NULL external_id never matches via this query.
17 GetCheckRunByExternalID(ctx context.Context, db DBTX, arg GetCheckRunByExternalIDParams) (CheckRun, error)
18 GetCheckSuite(ctx context.Context, db DBTX, id int64) (CheckSuite, error)
19 GetCheckSuiteForRepo(ctx context.Context, db DBTX, arg GetCheckSuiteForRepoParams) (GetCheckSuiteForRepoRow, error)
20 // Required-check evaluator: most recent run with the given name on the
21 // specified head_sha.
22 GetLatestCheckRunByName(ctx context.Context, db DBTX, arg GetLatestCheckRunByNameParams) (CheckRun, error)
23 // SPDX-License-Identifier: AGPL-3.0-or-later
24 // ─── check_suites ────────────────────────────────────────────────────
25 // Idempotent suite-by-(repo, head_sha, app_slug) lookup. Used by every
26 // check-run create so consumers don't need to manage suite ids. ON
27 // CONFLICT … DO UPDATE returns the existing row when the unique
28 // (repo_id, head_sha, app_slug) already exists; otherwise returns the
29 // freshly inserted one.
30 GetOrCreateCheckSuite(ctx context.Context, db DBTX, arg GetOrCreateCheckSuiteParams) (CheckSuite, error)
31 ListCheckRunsBySuite(ctx context.Context, db DBTX, suiteID int64) ([]CheckRun, error)
32 ListCheckRunsForCommit(ctx context.Context, db DBTX, arg ListCheckRunsForCommitParams) ([]CheckRun, error)
33 // Used by the stale-on-push hook to flip queued/in_progress suites on
34 // the previous head to conclusion='stale'.
35 ListCheckSuiteIDsForHead(ctx context.Context, db DBTX, arg ListCheckSuiteIDsForHeadParams) ([]int64, error)
36 ListCheckSuitesForCommit(ctx context.Context, db DBTX, arg ListCheckSuitesForCommitParams) ([]CheckSuite, error)
37 ListCheckSuitesForRepo(ctx context.Context, db DBTX, arg ListCheckSuitesForRepoParams) ([]ListCheckSuitesForRepoRow, error)
38 MarkCheckSuiteStale(ctx context.Context, db DBTX, id int64) error
39 UpdateCheckRun(ctx context.Context, db DBTX, arg UpdateCheckRunParams) error
40 // Persists the rollup result computed in Go (suite_rollup.go).
41 UpdateCheckSuiteRollup(ctx context.Context, db DBTX, arg UpdateCheckSuiteRollupParams) error
42 }
43
44 var _ Querier = (*Queries)(nil)
45