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

@ -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;