From d65b63056887a56341c4823780635115e2911159 Mon Sep 17 00:00:00 2001 From: Andras Banki-Horvath Date: Mon, 2 Dec 2024 19:13:19 +0100 Subject: [PATCH] sqldb: remove unused preimage query parameter --- sqldb/sqlc/invoices.sql.go | 7 +------ sqldb/sqlc/queries/invoices.sql | 3 --- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/sqldb/sqlc/invoices.sql.go b/sqldb/sqlc/invoices.sql.go index 0fea7541e..b98a78c69 100644 --- a/sqldb/sqlc/invoices.sql.go +++ b/sqldb/sqlc/invoices.sql.go @@ -191,11 +191,8 @@ WHERE ( i.hash = $3 OR $3 IS NULL ) AND ( - i.preimage = $4 OR + i.payment_addr = $4 OR $4 IS NULL -) AND ( - i.payment_addr = $5 OR - $5 IS NULL ) GROUP BY i.id LIMIT 2 @@ -205,7 +202,6 @@ type GetInvoiceParams struct { SetID []byte AddIndex sql.NullInt64 Hash []byte - Preimage []byte PaymentAddr []byte } @@ -217,7 +213,6 @@ func (q *Queries) GetInvoice(ctx context.Context, arg GetInvoiceParams) ([]Invoi arg.SetID, arg.AddIndex, arg.Hash, - arg.Preimage, arg.PaymentAddr, ) if err != nil { diff --git a/sqldb/sqlc/queries/invoices.sql b/sqldb/sqlc/queries/invoices.sql index 025189a65..f57c9ab76 100644 --- a/sqldb/sqlc/queries/invoices.sql +++ b/sqldb/sqlc/queries/invoices.sql @@ -47,9 +47,6 @@ WHERE ( ) AND ( i.hash = sqlc.narg('hash') OR sqlc.narg('hash') IS NULL -) AND ( - i.preimage = sqlc.narg('preimage') OR - sqlc.narg('preimage') IS NULL ) AND ( i.payment_addr = sqlc.narg('payment_addr') OR sqlc.narg('payment_addr') IS NULL