aboutsummaryrefslogtreecommitdiff
path: root/pgruntime
diff options
context:
space:
mode:
authorStefan Majewsky <majewsky@gmx.net>2026-07-30 22:53:28 +0200
committerStefan Majewsky <majewsky@gmx.net>2026-07-30 22:53:29 +0200
commita9c88a040a3c8b178e50bdd4dc5fde0012b96baf (patch)
tree2050c5a26f8f6688bbcf5ce9b7d5c47114067ddf /pgruntime
parent81e32cec36291685b59102594c714d235726e214 (diff)
downloadgo-gg-a9c88a040a3c8b178e50bdd4dc5fde0012b96baf.tar.gz
gsql: add context.Context argument to GSQLClose()
Required for pgx.Conn.Close().
Diffstat (limited to 'pgruntime')
-rw-r--r--pgruntime/connector.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pgruntime/connector.go b/pgruntime/connector.go
index 082f970..5d74266 100644
--- a/pgruntime/connector.go
+++ b/pgruntime/connector.go
@@ -47,7 +47,7 @@ func (c Connector[T]) Connect(ctx context.Context, target ConnectionTarget, beha
}
err = behavior.applyTo(ctx, db)
if err != nil {
- return none, errext.WithCleanup(err, "db.Close", db.GSQLClose())
+ return none, errext.WithCleanup(err, "db.Close", db.GSQLClose(ctx))
}
return db, nil
}
@@ -105,8 +105,8 @@ func (c Connector[T]) prepareTestDatabase(ctx context.Context, target Connection
}
_, err = execQuery(ctx, db, "DROP DATABASE IF EXISTS "+quoteIdentifier(dbName), nil)
if err != nil {
- return errext.WithCleanup(err, "db.Close", db.GSQLClose())
+ return errext.WithCleanup(err, "db.Close", db.GSQLClose(ctx))
}
_, err = execQuery(ctx, db, "CREATE DATABASE "+quoteIdentifier(dbName), nil)
- return errext.WithCleanup(err, "db.Close", db.GSQLClose())
+ return errext.WithCleanup(err, "db.Close", db.GSQLClose(ctx))
}