diff --git a/instantout/reservation/store.go b/instantout/reservation/store.go index 11bfc098..1426e07f 100644 --- a/instantout/reservation/store.go +++ b/instantout/reservation/store.go @@ -16,9 +16,9 @@ import ( "github.com/lightningnetwork/lnd/keychain" ) -// BaseDB is the interface that contains all the queries generated +// Querier is the interface that contains all the queries generated // by sqlc for the reservation table. -type BaseDB interface { +type Querier interface { // CreateReservation stores the reservation in the database. CreateReservation(ctx context.Context, arg sqlc.CreateReservationParams) error @@ -42,6 +42,12 @@ type BaseDB interface { // UpdateReservation updates a reservation. UpdateReservation(ctx context.Context, arg sqlc.UpdateReservationParams) error +} + +// BaseDB is the interface that contains all the queries generated +// by sqlc for the reservation table and transaction functionality. +type BaseDB interface { + Querier // ExecTx allows for executing a function in the context of a database // transaction. diff --git a/instantout/store.go b/instantout/store.go index a0f773ad..4ef8fa83 100644 --- a/instantout/store.go +++ b/instantout/store.go @@ -21,9 +21,9 @@ import ( "github.com/lightningnetwork/lnd/lnwallet/chainfee" ) -// InstantOutBaseDB is the interface that contains all the queries generated +// Querier is the interface that contains all the queries generated // by sqlc for the instantout table. -type InstantOutBaseDB interface { +type Querier interface { // InsertSwap inserts a new base swap. InsertSwap(ctx context.Context, arg sqlc.InsertSwapParams) error @@ -53,6 +53,12 @@ type InstantOutBaseDB interface { // GetInstantOutSwaps retrieves all instant out swaps. GetInstantOutSwaps(ctx context.Context) ([]sqlc.GetInstantOutSwapsRow, error) +} + +// InstantOutBaseDB is the interface that contains all the queries generated +// by sqlc for the instantout table and transaction functionality. +type InstantOutBaseDB interface { + Querier // ExecTx allows for executing a function in the context of a database // transaction. diff --git a/sweepbatcher/store.go b/sweepbatcher/store.go index ff0ffa4a..9524712a 100644 --- a/sweepbatcher/store.go +++ b/sweepbatcher/store.go @@ -15,7 +15,9 @@ import ( "github.com/lightningnetwork/lnd/lntypes" ) -type BaseDB interface { +// Querier is the interface that contains all the queries generated +// by sqlc for sweep batcher. +type Querier interface { // ConfirmBatch confirms a batch by setting the state to confirmed. ConfirmBatch(ctx context.Context, id int32) error @@ -52,6 +54,12 @@ type BaseDB interface { // UpsertSweep inserts a sweep into the database, or updates an existing // sweep if it already exists. UpsertSweep(ctx context.Context, arg sqlc.UpsertSweepParams) error +} + +// BaseDB is the interface that contains all the queries generated +// by sqlc for sweep batcher and transaction functionality. +type BaseDB interface { + Querier // ExecTx allows for executing a function in the context of a database // transaction.