From ca96a116a0e468f6fe9e1701ca90cf734acdef57 Mon Sep 17 00:00:00 2001 From: Stefan Majewsky Date: Tue, 10 Nov 2026 00:14:08 +0100 Subject: replace selectOneValue() with oblast.SelectOne() --- testing/pgruntime/connect_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'testing/pgruntime/connect_test.go') diff --git a/testing/pgruntime/connect_test.go b/testing/pgruntime/connect_test.go index 1073791..4992c7f 100644 --- a/testing/pgruntime/connect_test.go +++ b/testing/pgruntime/connect_test.go @@ -7,6 +7,7 @@ import ( "testing" "go.xyrillian.de/gg/assert" + "go.xyrillian.de/gg/oblast" ) func TestMultipleConnectionsToSameDB(t *testing.T) { @@ -31,7 +32,7 @@ func TestMultipleConnectionsToSameDB(t *testing.T) { if err != nil { t.Fatal(err.Error()) } - barID, err := selectOneValue[int64](ctx, db2, `SELECT id FROM objects WHERE name = $1`, "bar") + barID, err := oblast.SelectOne[int64](ctx, db2, `SELECT id FROM objects WHERE name = $1`, "bar") if assert.ErrEqual(t, err, nil) { assert.Equal(t, barID, 2) } @@ -44,7 +45,7 @@ func TestMultipleConnectionsToSameDB(t *testing.T) { if assert.ErrEqual(t, err, nil) { assert.Equal(t, count, 0) } - nextID, err := selectOneValue[int64](ctx, db3, `INSERT INTO objects (name) VALUES ($1) RETURNING id`, "qux") + nextID, err := oblast.SelectOne[int64](ctx, db3, `INSERT INTO objects (name) VALUES ($1) RETURNING id`, "qux") if assert.ErrEqual(t, err, nil) { assert.Equal(t, nextID, 1) // sequence was reset and starts at 1 again } -- cgit v1.3.1