paymentsdb: implement InitPayment for sql backend

This commit is contained in:
ziggie committed 2026-02-25 08:02:09 +01:00
1 parent 0c96a2d722
commit 510f6fb532
3 files changed
+133 -1

No files matched your search

+2
View File
@@ -760,6 +760,8 @@ type InsertPaymentParams struct {
}
// Insert a new payment and return its ID.
// When creating a payment we don't have a fail reason because we start the
// payment process.
func (q *Queries) InsertPayment(ctx context.Context, arg InsertPaymentParams) (int64, error) {
row := q.db.QueryRowContext(ctx, insertPayment, arg.AmountMsat, arg.CreatedAt, arg.PaymentIdentifier)
var id int64
+2
View File
@@ -163,6 +163,8 @@ type Querier interface {
// to have a newer last_update than the existing node).
InsertNodeMig(ctx context.Context, arg InsertNodeMigParams) (int64, error)
// Insert a new payment and return its ID.
// When creating a payment we don't have a fail reason because we start the
// payment process.
InsertPayment(ctx context.Context, arg InsertPaymentParams) (int64, error)
InsertPaymentAttemptFirstHopCustomRecord(ctx context.Context, arg InsertPaymentAttemptFirstHopCustomRecordParams) error
InsertPaymentFirstHopCustomRecord(ctx context.Context, arg InsertPaymentFirstHopCustomRecordParams) error