|
1 | 1 | package paymentsdb |
2 | 2 |
|
3 | 3 | import ( |
| 4 | + "context" |
4 | 5 | "fmt" |
5 | 6 |
|
6 | 7 | "github.com/lightningnetwork/lnd/sqldb" |
| 8 | + "github.com/lightningnetwork/lnd/sqldb/sqlc" |
7 | 9 | ) |
8 | 10 |
|
9 | 11 | // SQLQueries is a subset of the sqlc.Querier interface that can be used to |
10 | 12 | // execute queries against the SQL payments tables. |
11 | 13 | type SQLQueries interface { |
| 14 | + /* |
| 15 | + Payment DB read operations. |
| 16 | + */ |
| 17 | + FilterPayments(ctx context.Context, query sqlc.FilterPaymentsParams) ([]sqlc.FilterPaymentsRow, error) |
| 18 | + FetchPayment(ctx context.Context, paymentIdentifier []byte) (sqlc.FetchPaymentRow, error) |
| 19 | + FetchPaymentsByIDs(ctx context.Context, paymentIDs []int64) ([]sqlc.FetchPaymentsByIDsRow, error) |
| 20 | + |
| 21 | + CountPayments(ctx context.Context) (int64, error) |
| 22 | + |
| 23 | + FetchHtlcAttemptsForPayments(ctx context.Context, paymentIDs []int64) ([]sqlc.FetchHtlcAttemptsForPaymentsRow, error) |
| 24 | + FetchAllInflightAttempts(ctx context.Context) ([]sqlc.PaymentHtlcAttempt, error) |
| 25 | + FetchHopsForAttempts(ctx context.Context, htlcAttemptIndices []int64) ([]sqlc.FetchHopsForAttemptsRow, error) |
| 26 | + |
| 27 | + FetchPaymentLevelFirstHopCustomRecords(ctx context.Context, paymentIDs []int64) ([]sqlc.PaymentFirstHopCustomRecord, error) |
| 28 | + FetchRouteLevelFirstHopCustomRecords(ctx context.Context, htlcAttemptIndices []int64) ([]sqlc.PaymentAttemptFirstHopCustomRecord, error) |
| 29 | + FetchHopLevelCustomRecords(ctx context.Context, hopIDs []int64) ([]sqlc.PaymentHopCustomRecord, error) |
12 | 30 | } |
13 | 31 |
|
14 | 32 | // BatchedSQLQueries is a version of the SQLQueries that's capable |
|
0 commit comments