Go · 2527 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 // Required-check evaluator: most recent run with the given name on the
20 // specified head_sha.
21 GetLatestCheckRunByName(ctx context.Context, db DBTX, arg GetLatestCheckRunByNameParams) (CheckRun, error)
22 // SPDX-License-Identifier: AGPL-3.0-or-later
23 // ─── check_suites ────────────────────────────────────────────────────
24 // Idempotent suite-by-(repo, head_sha, app_slug) lookup. Used by every
25 // check-run create so consumers don't need to manage suite ids. ON
26 // CONFLICT … DO UPDATE returns the existing row when the unique
27 // (repo_id, head_sha, app_slug) already exists; otherwise returns the
28 // freshly inserted one.
29 GetOrCreateCheckSuite(ctx context.Context, db DBTX, arg GetOrCreateCheckSuiteParams) (CheckSuite, error)
30 ListCheckRunsBySuite(ctx context.Context, db DBTX, suiteID int64) ([]CheckRun, error)
31 ListCheckRunsForCommit(ctx context.Context, db DBTX, arg ListCheckRunsForCommitParams) ([]CheckRun, error)
32 // Used by the stale-on-push hook to flip queued/in_progress suites on
33 // the previous head to conclusion='stale'.
34 ListCheckSuiteIDsForHead(ctx context.Context, db DBTX, arg ListCheckSuiteIDsForHeadParams) ([]int64, error)
35 ListCheckSuitesForCommit(ctx context.Context, db DBTX, arg ListCheckSuitesForCommitParams) ([]CheckSuite, error)
36 MarkCheckSuiteStale(ctx context.Context, db DBTX, id int64) error
37 UpdateCheckRun(ctx context.Context, db DBTX, arg UpdateCheckRunParams) error
38 // Persists the rollup result computed in Go (suite_rollup.go).
39 UpdateCheckSuiteRollup(ctx context.Context, db DBTX, arg UpdateCheckSuiteRollupParams) error
40 }
41
42 var _ Querier = (*Queries)(nil)
43