Upgrade to pgx v5

This commit is contained in:
Jesse de Wit
2023-10-23 14:42:28 +02:00
parent 3cf4b714a9
commit 8a7133f116
11 changed files with 29 additions and 28 deletions

View File

@@ -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)
}