MCPcopy
hub / github.com/jackc/pgx / TestRowScannerErrorIsFatalToRows

Function TestRowScannerErrorIsFatalToRows

rows_test.go:47–55  ·  view source on GitHub ↗

https://github.com/jackc/pgx/issues/1654

(t *testing.T)

Source from the content-addressed store, hash-verified

45
46// https://github.com/jackc/pgx/issues/1654
47func TestRowScannerErrorIsFatalToRows(t *testing.T) {
48 t.Parallel()
49
50 defaultConnTestRunner.RunTest(context.Background(), t, func(ctx context.Context, t testing.TB, conn *pgx.Conn) {
51 s := testErrRowScanner("foo")
52 err := conn.QueryRow(ctx, "select 'Adam' as name, 72 as height").Scan(&s)
53 require.EqualError(t, err, "foo")
54 })
55}
56
57func TestForEachRow(t *testing.T) {
58 t.Parallel()

Callers

nothing calls this directly

Calls 4

testErrRowScannerTypeAlias · 0.85
RunTestMethod · 0.80
ScanMethod · 0.65
QueryRowMethod · 0.65

Tested by

no test coverage detected