multi: add relevant queries for QueryPayments implemenation
This commit is contained in:
4 files changed
+776
No files matched your search
@@ -1,14 +1,32 @@
|
||||
package paymentsdb
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/lightningnetwork/lnd/sqldb"
|
||||
"github.com/lightningnetwork/lnd/sqldb/sqlc"
|
||||
)
|
||||
|
||||
// SQLQueries is a subset of the sqlc.Querier interface that can be used to
|
||||
// execute queries against the SQL payments tables.
|
||||
type SQLQueries interface {
|
||||
/*
|
||||
Payment DB read operations.
|
||||
*/
|
||||
FilterPayments(ctx context.Context, query sqlc.FilterPaymentsParams) ([]sqlc.FilterPaymentsRow, error)
|
||||
FetchPayment(ctx context.Context, paymentIdentifier []byte) (sqlc.FetchPaymentRow, error)
|
||||
FetchPaymentsByIDs(ctx context.Context, paymentIDs []int64) ([]sqlc.FetchPaymentsByIDsRow, error)
|
||||
|
||||
CountPayments(ctx context.Context) (int64, error)
|
||||
|
||||
FetchHtlcAttemptsForPayments(ctx context.Context, paymentIDs []int64) ([]sqlc.FetchHtlcAttemptsForPaymentsRow, error)
|
||||
FetchAllInflightAttempts(ctx context.Context) ([]sqlc.PaymentHtlcAttempt, error)
|
||||
FetchHopsForAttempts(ctx context.Context, htlcAttemptIndices []int64) ([]sqlc.FetchHopsForAttemptsRow, error)
|
||||
|
||||
FetchPaymentLevelFirstHopCustomRecords(ctx context.Context, paymentIDs []int64) ([]sqlc.PaymentFirstHopCustomRecord, error)
|
||||
FetchRouteLevelFirstHopCustomRecords(ctx context.Context, htlcAttemptIndices []int64) ([]sqlc.PaymentAttemptFirstHopCustomRecord, error)
|
||||
FetchHopLevelCustomRecords(ctx context.Context, hopIDs []int64) ([]sqlc.PaymentHopCustomRecord, error)
|
||||
}
|
||||
|
||||
// BatchedSQLQueries is a version of the SQLQueries that's capable
|
||||
|
||||
Reference in new issue
Block a user