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

Function API_ROUTINE isc_dsql_allocate_statement

src/yvalve/why.cpp:2181–2210  ·  view source on GitHub ↗

Allocate a statement handle.

Source from the content-addressed store, hash-verified

2179
2180// Allocate a statement handle.
2181ISC_STATUS API_ROUTINE isc_dsql_allocate_statement(ISC_STATUS* userStatus, isc_db_handle* dbHandle,
2182 isc_stmt_handle* stmtHandle)
2183{
2184 StatusVector status(userStatus);
2185 CheckStatusWrapper statusWrapper(&status);
2186 IscStatement* statement = NULL;
2187
2188 try
2189 {
2190 RefPtr<YAttachment> attachment(translateHandle(attachments, dbHandle));
2191
2192 nullCheck(stmtHandle, isc_bad_stmt_handle);
2193
2194 statement = FB_NEW IscStatement(attachment);
2195 statement->addRef();
2196 attachment->childIscStatements.add(statement);
2197 *stmtHandle = statement->getHandle();
2198 }
2199 catch (const Exception& e)
2200 {
2201 if (statement)
2202 {
2203 *stmtHandle = 0;
2204 statement->release();
2205 }
2206 e.stuffException(&statusWrapper);
2207 }
2208
2209 return status[1];
2210}
2211
2212
2213// Describe output parameters (columns) for a prepared statement.

Callers

nothing calls this directly

Calls 8

translateHandleFunction · 0.85
nullCheckFunction · 0.85
IscStatementClass · 0.70
addRefMethod · 0.45
addMethod · 0.45
getHandleMethod · 0.45
releaseMethod · 0.45
stuffExceptionMethod · 0.45

Tested by

no test coverage detected