summaryrefslogtreecommitdiff
path: root/testing/pgruntime/helpers_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'testing/pgruntime/helpers_test.go')
-rw-r--r--testing/pgruntime/helpers_test.go14
1 files changed, 0 insertions, 14 deletions
diff --git a/testing/pgruntime/helpers_test.go b/testing/pgruntime/helpers_test.go
index ca4ffd2..835df8b 100644
--- a/testing/pgruntime/helpers_test.go
+++ b/testing/pgruntime/helpers_test.go
@@ -31,17 +31,3 @@ func queryRow(ctx context.Context, db gsql.Handle, query string, args, slots []a
err = stmt.QueryRow(ctx, args, slots)
return errext.WithCleanup(err, "stmt.Close", stmt.Close())
}
-
-// Convenience function for executing a one-off SQL query returning one value.
-// TODO: move to gsql
-func selectOneValue[T any](ctx context.Context, db gsql.Handle, query string, args ...any) (T, error) {
- stmt, err := db.GSQLPrepare(ctx, query, false)
- if err != nil {
- var none T
- return none, err
- }
-
- var result T
- err = stmt.QueryRow(ctx, args, []any{&result})
- return result, errext.WithCleanup(err, "stmt.Close", stmt.Close())
-}