mirror of
https://github.com/lightningnetwork/lnd.git
synced 2026-08-14 12:42:48 +02:00
invoices: add TODO to change the return type of the query
This commit is contained in:
parent
0ca69e6f57
commit
e2dfd8f034
3 changed files with 6 additions and 0 deletions
|
|
@ -547,6 +547,8 @@ INNER JOIN amp_sub_invoices a
|
|||
ON i.id = a.invoice_id AND a.set_id = $1
|
||||
`
|
||||
|
||||
// TODO(ziggie): This query can only return one invoice if the set_id is
|
||||
// the primary key of amp_sub_invoices table.
|
||||
func (q *Queries) GetInvoiceBySetID(ctx context.Context, setID []byte) ([]Invoice, error) {
|
||||
rows, err := q.db.QueryContext(ctx, getInvoiceBySetID, setID)
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -113,6 +113,8 @@ type Querier interface {
|
|||
GetInvoice(ctx context.Context, arg GetInvoiceParams) ([]Invoice, error)
|
||||
GetInvoiceByAddr(ctx context.Context, paymentAddr []byte) (Invoice, error)
|
||||
GetInvoiceByHash(ctx context.Context, hash []byte) (Invoice, error)
|
||||
// TODO(ziggie): This query can only return one invoice if the set_id is
|
||||
// the primary key of amp_sub_invoices table.
|
||||
GetInvoiceBySetID(ctx context.Context, setID []byte) ([]Invoice, error)
|
||||
GetInvoiceFeatures(ctx context.Context, invoiceID int64) ([]InvoiceFeature, error)
|
||||
GetInvoiceHTLCCustomRecords(ctx context.Context, invoiceID int64) ([]GetInvoiceHTLCCustomRecordsRow, error)
|
||||
|
|
|
|||
|
|
@ -65,6 +65,8 @@ FROM invoices i
|
|||
WHERE i.payment_addr = $1;
|
||||
|
||||
-- name: GetInvoiceBySetID :many
|
||||
-- TODO(ziggie): This query can only return one invoice if the set_id is
|
||||
-- the primary key of amp_sub_invoices table.
|
||||
SELECT i.*
|
||||
FROM invoices i
|
||||
INNER JOIN amp_sub_invoices a
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue