-- name: CreateTransaction :one
INSERT INTO fts.transactions (
    description, amount, category, transaction_date
) VALUES (
    $1, $2, $3, $4
)
RETURNING *;

-- name: ListTransactions :many
SELECT * FROM fts.transactions
ORDER BY transaction_date DESC, transaction_id DESC;

-- name: GetTransaction :one
SELECT * FROM fts.transactions
WHERE transaction_id = $1;

-- name: DeleteTransaction :exec
DELETE FROM fts.transactions
WHERE transaction_id = $1;
