https://github.com/jackc/pgx/issues/781
(t *testing.T)
| 422 | |
| 423 | // https://github.com/jackc/pgx/issues/781 |
| 424 | func TestConnQueryDifferentScanPlansIssue781(t *testing.T) { |
| 425 | testWithAllQueryExecModes(t, func(t *testing.T, db *sql.DB) { |
| 426 | var s string |
| 427 | var b bool |
| 428 | |
| 429 | rows, err := db.Query("select true, 'foo'") |
| 430 | require.NoError(t, err) |
| 431 | |
| 432 | require.True(t, rows.Next()) |
| 433 | require.NoError(t, rows.Scan(&b, &s)) |
| 434 | assert.Equal(t, true, b) |
| 435 | assert.Equal(t, "foo", s) |
| 436 | }) |
| 437 | } |
| 438 | |
| 439 | func TestConnQueryNull(t *testing.T) { |
| 440 | testWithAllQueryExecModes(t, func(t *testing.T, db *sql.DB) { |
nothing calls this directly
no test coverage detected