(t *testing.T, db *sql.DB)
| 93 | } |
| 94 | |
| 95 | func beginCursorTx(t *testing.T, db *sql.DB) *sql.Tx { |
| 96 | t.Helper() |
| 97 | tx, err := db.Begin() |
| 98 | if err != nil { |
| 99 | t.Fatalf("BEGIN: %v", err) |
| 100 | } |
| 101 | t.Cleanup(func() { _ = tx.Rollback() }) |
| 102 | return tx |
| 103 | } |
| 104 | |
| 105 | // cursorLifecycleFlow covers DECLARE → FETCH n → FETCH n (position advances) → |
| 106 | // FETCH ALL (drains the rest) → FETCH on exhausted cursor (zero rows) → |
no test coverage detected