(t *testing.T)
| 767 | } |
| 768 | |
| 769 | func TestConnRaw(t *testing.T) { |
| 770 | testWithAllQueryExecModes(t, func(t *testing.T, db *sql.DB) { |
| 771 | conn, err := db.Conn(context.Background()) |
| 772 | require.NoError(t, err) |
| 773 | |
| 774 | var n int |
| 775 | err = conn.Raw(func(driverConn any) error { |
| 776 | conn := driverConn.(*stdlib.Conn).Conn() |
| 777 | return conn.QueryRow(context.Background(), "select 42").Scan(&n) |
| 778 | }) |
| 779 | require.NoError(t, err) |
| 780 | assert.EqualValues(t, 42, n) |
| 781 | }) |
| 782 | } |
| 783 | |
| 784 | func TestConnPingContextSuccess(t *testing.T) { |
| 785 | testWithAllQueryExecModes(t, func(t *testing.T, db *sql.DB) { |
nothing calls this directly
no test coverage detected