Refactor gRPC adapter to use connection pool and improve error handling in product retrieval

This commit is contained in:
2025-05-27 17:50:20 +03:00
parent b083cccc09
commit b48421e653
8 changed files with 44 additions and 40 deletions

View File

@@ -2,15 +2,14 @@ package marketplace
import (
"context"
"github.com/jackc/pgx/v5"
"sipro-mps/internal/marketplace/db"
)
type dbRepository struct {
conn *pgx.Conn
conn db.DBTX
}
func NewDBRepository(conn *pgx.Conn) Repository {
func NewDBRepository(conn db.DBTX) Repository {
return &dbRepository{conn: conn}
}