MCPcopy Create free account
hub / github.com/PostHog/duckgres / beginCursorTx

Function beginCursorTx

tests/integration/cursor_test.go:95–103  ·  view source on GitHub ↗
(t *testing.T, db *sql.DB)

Source from the content-addressed store, hash-verified

93}
94
95func 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) →

Callers 5

cursorLifecycleFlowFunction · 0.85
cursorMoveFlowFunction · 0.85
cursorBackwardFlowFunction · 0.85
cursorMissingFlowFunction · 0.85
TestCursorSimpleQueryFunction · 0.85

Calls 1

RollbackMethod · 0.65

Tested by

no test coverage detected