37 lines
756 B
Go
37 lines
756 B
Go
// Code generated by sqlc. DO NOT EDIT.
|
|
// versions:
|
|
// sqlc v1.31.1
|
|
// source: check_runs.sql
|
|
|
|
package db
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
const createCheckRun = `-- name: CreateCheckRun :one
|
|
INSERT INTO check_runs (id, domain_id, result)
|
|
VALUES ($1, $2, $3)
|
|
RETURNING id, domain_id, result, created_at
|
|
`
|
|
|
|
type CreateCheckRunParams struct {
|
|
ID uuid.UUID `json:"id"`
|
|
DomainID uuid.UUID `json:"domain_id"`
|
|
Result []byte `json:"result"`
|
|
}
|
|
|
|
func (q *Queries) CreateCheckRun(ctx context.Context, arg CreateCheckRunParams) (CheckRun, error) {
|
|
row := q.db.QueryRow(ctx, createCheckRun, arg.ID, arg.DomainID, arg.Result)
|
|
var i CheckRun
|
|
err := row.Scan(
|
|
&i.ID,
|
|
&i.DomainID,
|
|
&i.Result,
|
|
&i.CreatedAt,
|
|
)
|
|
return i, err
|
|
}
|