2025-01-06 12:26:28 +00:00
|
|
|
package database
|
|
|
|
|
|
|
|
|
|
import (
|
2025-01-06 13:30:20 +00:00
|
|
|
"context"
|
2025-01-06 12:26:28 +00:00
|
|
|
"queryorchestration/internal/database/repository"
|
|
|
|
|
|
2025-01-06 13:30:20 +00:00
|
|
|
"github.com/jackc/pgx/v5"
|
2025-01-06 12:26:28 +00:00
|
|
|
)
|
|
|
|
|
|
2025-01-06 13:30:20 +00:00
|
|
|
type Pool interface {
|
|
|
|
|
Begin(ctx context.Context) (pgx.Tx, error)
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-06 12:26:28 +00:00
|
|
|
type Connection struct {
|
2025-01-06 13:30:20 +00:00
|
|
|
Pool Pool
|
2025-01-06 12:26:28 +00:00
|
|
|
Queries *repository.Queries
|
|
|
|
|
}
|