Use uuid.UUID everywhere and have postgres generate ids

This commit is contained in:
2021-11-29 21:49:37 +00:00
parent 5e8a98872f
commit 85ef7557c1
19 changed files with 199 additions and 93 deletions

View File

@ -5,6 +5,8 @@ package postgres
import (
"context"
"github.com/google/uuid"
)
const linkBudgetToUser = `-- name: LinkBudgetToUser :one
@ -15,8 +17,8 @@ RETURNING user_id, budget_id
`
type LinkBudgetToUserParams struct {
UserID string
BudgetID string
UserID uuid.UUID
BudgetID uuid.UUID
}
func (q *Queries) LinkBudgetToUser(ctx context.Context, arg LinkBudgetToUserParams) (UserBudget, error) {