Use uuid.UUID everywhere and have postgres generate ids
This commit is contained in:
9
postgres/queries/transactions.sql
Normal file
9
postgres/queries/transactions.sql
Normal file
@ -0,0 +1,9 @@
|
||||
-- name: CreateTransaction :one
|
||||
INSERT INTO transactions
|
||||
(budget_id, date, memo, amount)
|
||||
VALUES ($1, $2, $3, $4)
|
||||
RETURNING *;
|
||||
|
||||
-- name: GetTransactionsForBudget :many
|
||||
SELECT transactions.* FROM transactions
|
||||
WHERE transactions.budget_id = $1;
|
Reference in New Issue
Block a user