pgx.Conn -> pgxpool.Pool

This commit is contained in:
2024-11-06 18:19:27 +04:00
parent 62346bd3d4
commit c6d680d0c0
4 changed files with 12 additions and 8 deletions

View File

@@ -4,15 +4,16 @@ import (
"context"
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgxpool"
"github.com/aykhans/movier/server/pkg/dto"
)
type IMDbRepository struct {
db *pgx.Conn
db *pgxpool.Pool
}
func NewIMDbRepository(db *pgx.Conn) *IMDbRepository {
func NewIMDbRepository(db *pgxpool.Pool) *IMDbRepository {
return &IMDbRepository{
db: db,
}