Regenerate sqlc
This commit is contained in:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user