MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / close

Method close

src/dsql/DsqlCursor.cpp:69–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69void DsqlCursor::close(thread_db* tdbb, DsqlCursor* cursor)
70{
71 if (!cursor)
72 return;
73
74 const auto attachment = cursor->getAttachment();
75 const auto dsqlRequest = cursor->m_dsqlRequest;
76
77 if (dsqlRequest->getRequest())
78 {
79 ThreadStatusGuard status_vector(tdbb);
80 try
81 {
82 // Report some remaining fetches if any
83 if (dsqlRequest->req_fetch_baseline)
84 {
85 TraceDSQLFetch trace(attachment, dsqlRequest);
86 trace.fetch(true, ITracePlugin::RESULT_SUCCESS);
87 }
88
89 if (dsqlRequest->req_traced && TraceManager::need_dsql_free(attachment))
90 {
91 TraceSQLStatementImpl stmt(dsqlRequest, NULL);
92 TraceManager::event_dsql_free(attachment, &stmt, DSQL_close);
93 }
94
95 JRD_unwind_request(tdbb, dsqlRequest->getRequest());
96 }
97 catch (Firebird::Exception&)
98 {} // no-op
99 }
100
101 dsqlRequest->req_cursor = NULL;
102 TRA_unlink_cursor(dsqlRequest->req_transaction, cursor);
103 delete cursor;
104}
105
106int DsqlCursor::fetchNext(thread_db* tdbb, UCHAR* buffer)
107{

Callers 3

executeMethod · 0.45
executeMethod · 0.45
executeMethod · 0.45

Calls 5

JRD_unwind_requestFunction · 0.85
TRA_unlink_cursorFunction · 0.85
getAttachmentMethod · 0.45
getRequestMethod · 0.45
fetchMethod · 0.45

Tested by

no test coverage detected