mirror of
https://github.com/aljazceru/lspd.git
synced 2025-12-19 06:44:23 +01:00
Upgrade to pgx v5
This commit is contained in:
@@ -4,12 +4,12 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/jackc/pgx/v4/pgxpool"
|
||||
"github.com/jackc/pgx/v5/pgxpool"
|
||||
)
|
||||
|
||||
func PgConnect(databaseUrl string) (*pgxpool.Pool, error) {
|
||||
var err error
|
||||
pgxPool, err := pgxpool.Connect(context.Background(), databaseUrl)
|
||||
pgxPool, err := pgxpool.New(context.Background(), databaseUrl)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("pgxpool.Connect(%v): %w", databaseUrl, err)
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
"log"
|
||||
|
||||
"github.com/breez/lspd/lnd"
|
||||
"github.com/jackc/pgx/v4"
|
||||
"github.com/jackc/pgx/v4/pgxpool"
|
||||
"github.com/jackc/pgx/v5"
|
||||
"github.com/jackc/pgx/v5/pgxpool"
|
||||
)
|
||||
|
||||
type ForwardingEventStore struct {
|
||||
|
||||
@@ -11,8 +11,8 @@ import (
|
||||
"github.com/breez/lspd/lightning"
|
||||
"github.com/btcsuite/btcd/wire"
|
||||
"github.com/jackc/pgtype"
|
||||
"github.com/jackc/pgx/v4"
|
||||
"github.com/jackc/pgx/v4/pgxpool"
|
||||
"github.com/jackc/pgx/v5"
|
||||
"github.com/jackc/pgx/v5/pgxpool"
|
||||
)
|
||||
|
||||
type PostgresInterceptStore struct {
|
||||
|
||||
@@ -12,8 +12,8 @@ import (
|
||||
"github.com/breez/lspd/lsps0"
|
||||
"github.com/breez/lspd/lsps2"
|
||||
"github.com/btcsuite/btcd/wire"
|
||||
"github.com/jackc/pgx/v4"
|
||||
"github.com/jackc/pgx/v4/pgxpool"
|
||||
"github.com/jackc/pgx/v5"
|
||||
"github.com/jackc/pgx/v5/pgxpool"
|
||||
)
|
||||
|
||||
type Lsps2Store struct {
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"encoding/hex"
|
||||
"time"
|
||||
|
||||
"github.com/jackc/pgx/v4/pgxpool"
|
||||
"github.com/jackc/pgx/v5/pgxpool"
|
||||
)
|
||||
|
||||
type NotificationsStore struct {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/breez/lspd/common"
|
||||
"github.com/jackc/pgx/v4/pgxpool"
|
||||
"github.com/jackc/pgx/v5/pgxpool"
|
||||
)
|
||||
|
||||
type extendedParams struct {
|
||||
|
||||
Reference in New Issue
Block a user