MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / API_ROUTINE isc_dsql_fetch

Function API_ROUTINE isc_dsql_fetch

src/yvalve/why.cpp:2538–2564  ·  view source on GitHub ↗

Fetch next record from a dynamic SQL cursor

Source from the content-addressed store, hash-verified

2536
2537// Fetch next record from a dynamic SQL cursor
2538ISC_STATUS API_ROUTINE isc_dsql_fetch(ISC_STATUS* userStatus, isc_stmt_handle* stmtHandle,
2539 USHORT dialect, const XSQLDA* sqlda)
2540{
2541 StatusVector status(userStatus);
2542 CheckStatusWrapper statusWrapper(&status);
2543
2544 try
2545 {
2546 if (!sqlda)
2547 status_exception::raise(Arg::Gds(isc_dsql_sqlda_err) << Arg::Gds(isc_dsql_no_output_sqlda));
2548
2549 RefPtr<IscStatement> statement(translateHandle(statements, stmtHandle));
2550
2551 SQLDAMetadataLauncher outMessage(sqlda);
2552
2553 if (statement->fetch(&statusWrapper, outMessage.metadata, outMessage.getBuffer()))
2554 outMessage.scatterData();
2555 else if (!(status.getState() & IStatus::STATE_ERRORS))
2556 return 100;
2557 }
2558 catch (const Exception& e)
2559 {
2560 e.stuffException(&statusWrapper);
2561 }
2562
2563 return status[1];
2564}
2565
2566
2567// Fetch next record from a dynamic SQL cursor

Callers

nothing calls this directly

Calls 8

raiseFunction · 0.85
GdsClass · 0.85
translateHandleFunction · 0.85
fetchMethod · 0.45
getBufferMethod · 0.45
scatterDataMethod · 0.45
getStateMethod · 0.45
stuffExceptionMethod · 0.45

Tested by

no test coverage detected