refactor(store): sqlc override uuid→google/uuid.UUID (убирает pgtype boilerplate)
This commit is contained in:
@@ -8,7 +8,7 @@ package db
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/jackc/pgx/v5/pgtype"
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
const createCheckRun = `-- name: CreateCheckRun :one
|
||||
@@ -18,9 +18,9 @@ RETURNING id, domain_id, result, created_at
|
||||
`
|
||||
|
||||
type CreateCheckRunParams struct {
|
||||
ID pgtype.UUID `json:"id"`
|
||||
DomainID pgtype.UUID `json:"domain_id"`
|
||||
Result []byte `json:"result"`
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user