diff options
Diffstat (limited to '')
-rw-r--r-- | forged/internal/database/database.go | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/forged/internal/database/database.go b/forged/internal/database/database.go index 093ed8f..d96af6b 100644 --- a/forged/internal/database/database.go +++ b/forged/internal/database/database.go @@ -11,17 +11,12 @@ import ( "github.com/jackc/pgx/v5/pgxpool" ) -// Database is a wrapper around pgxpool.Pool to provide a common interface for -// other packages in the forge. type Database struct { *pgxpool.Pool } -// Open opens a new database connection pool using the provided connection -// string. It returns a Database instance and an error if any occurs. -// It is run indefinitely in the background. -func Open(ctx context.Context, config Config) (Database, error) { - db, err := pgxpool.New(ctx, config.Conn) +func Open(ctx context.Context, conn string) (Database, error) { + db, err := pgxpool.New(ctx, conn) if err != nil { err = fmt.Errorf("create pgxpool: %w", err) } |