Show first 200 transactions only
This commit is contained in:
parent
61c55dda3a
commit
67139ceff8
@ -8,9 +8,11 @@ RETURNING *;
|
|||||||
SELECT transactions.* FROM transactions
|
SELECT transactions.* FROM transactions
|
||||||
LEFT JOIN accounts ON accounts.id = transactions.account_id
|
LEFT JOIN accounts ON accounts.id = transactions.account_id
|
||||||
WHERE accounts.budget_id = $1
|
WHERE accounts.budget_id = $1
|
||||||
ORDER BY transactions.date DESC;
|
ORDER BY transactions.date DESC
|
||||||
|
LIMIT 200;
|
||||||
|
|
||||||
-- name: GetTransactionsForAccount :many
|
-- name: GetTransactionsForAccount :many
|
||||||
SELECT transactions.* FROM transactions
|
SELECT transactions.* FROM transactions
|
||||||
WHERE transactions.account_id = $1
|
WHERE transactions.account_id = $1
|
||||||
ORDER BY transactions.date DESC;
|
ORDER BY transactions.date DESC
|
||||||
|
LIMIT 200;
|
@ -50,6 +50,7 @@ const getTransactionsForAccount = `-- name: GetTransactionsForAccount :many
|
|||||||
SELECT transactions.id, transactions.date, transactions.memo, transactions.amount, transactions.account_id, transactions.payee_id FROM transactions
|
SELECT transactions.id, transactions.date, transactions.memo, transactions.amount, transactions.account_id, transactions.payee_id FROM transactions
|
||||||
WHERE transactions.account_id = $1
|
WHERE transactions.account_id = $1
|
||||||
ORDER BY transactions.date DESC
|
ORDER BY transactions.date DESC
|
||||||
|
LIMIT 200
|
||||||
`
|
`
|
||||||
|
|
||||||
func (q *Queries) GetTransactionsForAccount(ctx context.Context, accountID uuid.UUID) ([]Transaction, error) {
|
func (q *Queries) GetTransactionsForAccount(ctx context.Context, accountID uuid.UUID) ([]Transaction, error) {
|
||||||
@ -84,6 +85,7 @@ SELECT transactions.id, transactions.date, transactions.memo, transactions.amoun
|
|||||||
LEFT JOIN accounts ON accounts.id = transactions.account_id
|
LEFT JOIN accounts ON accounts.id = transactions.account_id
|
||||||
WHERE accounts.budget_id = $1
|
WHERE accounts.budget_id = $1
|
||||||
ORDER BY transactions.date DESC
|
ORDER BY transactions.date DESC
|
||||||
|
LIMIT 200
|
||||||
`
|
`
|
||||||
|
|
||||||
func (q *Queries) GetTransactionsForBudget(ctx context.Context, budgetID uuid.UUID) ([]Transaction, error) {
|
func (q *Queries) GetTransactionsForBudget(ctx context.Context, budgetID uuid.UUID) ([]Transaction, error) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user