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

Method closeCursor

server/conn_cursor.go:85–97  ·  view source on GitHub ↗

closeCursor closes a specific cursor and cleans up its resources.

(name string)

Source from the content-addressed store, hash-verified

83 if cursor.rows != nil {
84 _ = cursor.rows.Close()
85 }
86 if cursor.cleanup != nil {
87 cursor.cleanup()
88 }
89 delete(c.cursors, name)
90}
91
92// closeAllCursors closes all open cursors on this connection.
93func (c *clientConn) closeAllCursors() {
94 for name := range c.cursors {
95 c.closeCursor(name)
96 }
97}
98
99// closeCursorsAtTxEnd closes all open cursors before a COMMIT/ROLLBACK
100// statement executes. PostgreSQL destroys non-holdable cursors at transaction

Callers 8

TestCursorCloseSingleFunction · 0.95
closeAllCursorsMethod · 0.95
handleDeclareCursorMethod · 0.95
handleCloseCursorMethod · 0.95

Calls 2

CloseMethod · 0.65
cleanupMethod · 0.45

Tested by 2

TestCursorCloseSingleFunction · 0.76