Refactor gRPC adapter to use connection pool and improve error handling in product retrieval
This commit is contained in:
		@@ -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}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user