summaryrefslogtreecommitdiff
path: root/testing/pgruntime/helpers_test.go
diff options
context:
space:
mode:
authorStefan Majewsky <majewsky@gmx.net>2026-11-10 00:32:16 +0100
committerStefan Majewsky <majewsky@gmx.net>2026-11-10 00:32:16 +0100
commitf082ae9a138edd1ee1bcdfc40276013064fbec7e (patch)
treec18e5e63f283912f0989e9e82701ca28ff52c332 /testing/pgruntime/helpers_test.go
parent833e477420513a46faa4ebcc1164c50a8288a9ab (diff)
downloadgo-gg-f082ae9a138edd1ee1bcdfc40276013064fbec7e.tar.gz
replace execQuery() with new gsql.Exec() helper
Diffstat (limited to 'testing/pgruntime/helpers_test.go')
-rw-r--r--testing/pgruntime/helpers_test.go23
1 files changed, 0 insertions, 23 deletions
diff --git a/testing/pgruntime/helpers_test.go b/testing/pgruntime/helpers_test.go
deleted file mode 100644
index d8c3cc9..0000000
--- a/testing/pgruntime/helpers_test.go
+++ /dev/null
@@ -1,23 +0,0 @@
-// SPDX-FileCopyrightText: 2026 Stefan Majewsky <majewsky@gmx.net>
-// SPDX-License-Identifier: Apache-2.0
-
-package pgruntime_test
-
-import (
- "context"
- "database/sql"
-
- "go.xyrillian.de/gg/errext"
- "go.xyrillian.de/gg/gsql"
-)
-
-// Convenience function for executing a one-off SQL query returning no rows.
-// TODO: move to gsql
-func execQuery(ctx context.Context, db gsql.Handle, query string, args []any) (sql.Result, error) {
- stmt, err := db.GSQLPrepare(ctx, query, false)
- if err != nil {
- return nil, err
- }
- result, err := stmt.Exec(ctx, args)
- return result, errext.WithCleanup(err, "stmt.Close", stmt.Close())
-}