Merge schemas into one file
This commit is contained in:
@ -1,9 +1,14 @@
|
||||
-- name: CreateTransaction :one
|
||||
INSERT INTO transactions
|
||||
(budget_id, date, memo, amount)
|
||||
VALUES ($1, $2, $3, $4)
|
||||
(date, memo, amount, account_id, payee_id)
|
||||
VALUES ($1, $2, $3, $4, $5)
|
||||
RETURNING *;
|
||||
|
||||
-- name: GetTransactionsForBudget :many
|
||||
SELECT transactions.* FROM transactions
|
||||
WHERE transactions.budget_id = $1;
|
||||
LEFT JOIN accounts ON accounts.id = transactions.account_id
|
||||
WHERE accounts.budget_id = $1;
|
||||
|
||||
-- name: GetTransactionsForAccount :many
|
||||
SELECT transactions.* FROM transactions
|
||||
WHERE transactions.account_id = $1;
|
Reference in New Issue
Block a user