Provide type for extended protocol query
This commit is contained in:
+1
-1
@@ -56,7 +56,7 @@ type queryRower interface {
|
|||||||
|
|
||||||
func testQueryRow(t *testing.T, db queryRower) {
|
func testQueryRow(t *testing.T, db queryRower) {
|
||||||
var what, who string
|
var what, who string
|
||||||
err := db.QueryRow(context.Background(), "select 'hello', $1", "world").Scan(&what, &who)
|
err := db.QueryRow(context.Background(), "select 'hello', $1::text", "world").Scan(&what, &who)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
assert.Equal(t, "hello", what)
|
assert.Equal(t, "hello", what)
|
||||||
assert.Equal(t, "world", who)
|
assert.Equal(t, "world", who)
|
||||||
|
|||||||
Reference in New Issue
Block a user