Introduce own Numeric type and revert to stdlib from pgx
This commit is contained in:
@ -22,7 +22,7 @@ type CreatePayeeParams struct {
|
||||
}
|
||||
|
||||
func (q *Queries) CreatePayee(ctx context.Context, arg CreatePayeeParams) (Payee, error) {
|
||||
row := q.db.QueryRow(ctx, createPayee, arg.Name, arg.BudgetID)
|
||||
row := q.db.QueryRowContext(ctx, createPayee, arg.Name, arg.BudgetID)
|
||||
var i Payee
|
||||
err := row.Scan(&i.ID, &i.BudgetID, &i.Name)
|
||||
return i, err
|
||||
@ -34,7 +34,7 @@ WHERE payees.budget_id = $1
|
||||
`
|
||||
|
||||
func (q *Queries) GetPayees(ctx context.Context, budgetID uuid.UUID) ([]Payee, error) {
|
||||
rows, err := q.db.Query(ctx, getPayees, budgetID)
|
||||
rows, err := q.db.QueryContext(ctx, getPayees, budgetID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -47,6 +47,9 @@ func (q *Queries) GetPayees(ctx context.Context, budgetID uuid.UUID) ([]Payee, e
|
||||
}
|
||||
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