Regenerate sqlc

This commit is contained in:
2021-12-02 10:44:01 +00:00
parent adce350e0c
commit cdc767a497
4 changed files with 13 additions and 22 deletions

View File

@ -17,7 +17,7 @@ RETURNING id, name, last_modification
`
func (q *Queries) CreateBudget(ctx context.Context, name string) (Budget, error) {
row := q.db.QueryRowContext(ctx, createBudget, name)
row := q.db.QueryRow(ctx, createBudget, name)
var i Budget
err := row.Scan(&i.ID, &i.Name, &i.LastModification)
return i, err
@ -29,7 +29,7 @@ WHERE id = $1
`
func (q *Queries) GetBudget(ctx context.Context, id uuid.UUID) (Budget, error) {
row := q.db.QueryRowContext(ctx, getBudget, id)
row := q.db.QueryRow(ctx, getBudget, id)
var i Budget
err := row.Scan(&i.ID, &i.Name, &i.LastModification)
return i, err
@ -42,7 +42,7 @@ WHERE user_budgets.user_id = $1
`
func (q *Queries) GetBudgetsForUser(ctx context.Context, userID uuid.UUID) ([]Budget, error) {
rows, err := q.db.QueryContext(ctx, getBudgetsForUser, userID)
rows, err := q.db.Query(ctx, getBudgetsForUser, userID)
if err != nil {
return nil, err
}
@ -55,9 +55,6 @@ func (q *Queries) GetBudgetsForUser(ctx context.Context, userID uuid.UUID) ([]Bu
}
items = append(items, i)
}
if err := rows.Close(); err != nil {
return nil, err
}
if err := rows.Err(); err != nil {
return nil, err
}