diff options
| author | Stefan Majewsky <majewsky@gmx.net> | 2026-11-10 00:19:47 +0100 |
|---|---|---|
| committer | Stefan Majewsky <majewsky@gmx.net> | 2026-11-10 00:19:47 +0100 |
| commit | 833e477420513a46faa4ebcc1164c50a8288a9ab (patch) | |
| tree | 62957737a002308829a1b0361ae1e32c72e8a8c6 /pgruntime/helpers.go | |
| parent | ca96a116a0e468f6fe9e1701ca90cf734acdef57 (diff) | |
| download | go-gg-833e477420513a46faa4ebcc1164c50a8288a9ab.tar.gz | |
replace query() with oblast.SelectOne() or oblast.TupleSelectOne()
Diffstat (limited to 'pgruntime/helpers.go')
| -rw-r--r-- | pgruntime/helpers.go | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/pgruntime/helpers.go b/pgruntime/helpers.go index 7a7d97e..1b9e11f 100644 --- a/pgruntime/helpers.go +++ b/pgruntime/helpers.go @@ -23,16 +23,6 @@ func execQuery(ctx context.Context, db gsql.Handle, query string, args []any) (s return result, errext.WithCleanup(err, "stmt.Close", stmt.Close()) } -// Convenience function for executing a one-off SQL query returning one row. -func queryRow(ctx context.Context, db gsql.Handle, query string, args, slots []any) error { - stmt, err := db.GSQLPrepare(ctx, query, false) - if err != nil { - return err - } - err = stmt.QueryRow(ctx, args, slots) - return errext.WithCleanup(err, "stmt.Close", stmt.Close()) -} - // Convenience function for preparing an identifier that needs to be inserted into a query verbatim // (e.g. a database name for CREATE DATABASE). func quoteIdentifier(name string) string { |
