Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions accounts/store_sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ type SQLQueries interface {
UpdateAccountBalance(ctx context.Context, arg sqlc.UpdateAccountBalanceParams) (int64, error)
UpdateAccountExpiry(ctx context.Context, arg sqlc.UpdateAccountExpiryParams) (int64, error)
UpdateAccountLastUpdate(ctx context.Context, arg sqlc.UpdateAccountLastUpdateParams) (int64, error)
// UpdateAccountAliasForTests is a query intended only for testing
// purposes, to change the account alias.
UpdateAccountAliasForTests(ctx context.Context, arg sqlc.UpdateAccountAliasForTestsParams) (int64, error)
UpsertAccountPayment(ctx context.Context, arg sqlc.UpsertAccountPaymentParams) error
GetAccountInvoice(ctx context.Context, arg sqlc.GetAccountInvoiceParams) (sqlc.AccountInvoice, error)
}
Expand Down
20 changes: 20 additions & 0 deletions db/sqlc/accounts.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions db/sqlc/actions.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions db/sqlc/querier.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions db/sqlc/queries/accounts.sql
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ RETURNING id;
INSERT INTO account_invoices (account_id, hash)
VALUES ($1, $2);

-- name: UpdateAccountAliasForTests :one
-- NOTE: This query is only intended for testing purposes.
UPDATE accounts
SET alias = $1
WHERE id = $2
RETURNING id;

-- name: DeleteAccountPayment :exec
DELETE FROM account_payments
WHERE hash = $1
Expand Down
6 changes: 6 additions & 0 deletions db/sqlc/queries/actions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,9 @@ UPDATE actions
SET action_state = $1,
error_reason = $2
WHERE id = $3;


-- name: GetAction :one
SELECT *
FROM actions
WHERE id = $1;
1 change: 1 addition & 0 deletions firewalldb/actions_sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ type SQLActionQueries interface {
SetActionState(ctx context.Context, arg sqlc.SetActionStateParams) error
ListActions(ctx context.Context, arg sqlc.ListActionsParams) ([]sqlc.Action, error)
CountActions(ctx context.Context, arg sqlc.ActionQueryParams) (int64, error)
GetAction(ctx context.Context, id int64) (sqlc.Action, error)
}

// sqlActionLocator helps us find an action in the SQL DB.
Expand Down
Loading
Loading