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

Function API_ROUTINE isc_database_cleanup

src/yvalve/why.cpp:2015–2039  ·  view source on GitHub ↗

Register an attachment specific cleanup handler.

Source from the content-addressed store, hash-verified

2013
2014// Register an attachment specific cleanup handler.
2015ISC_STATUS API_ROUTINE isc_database_cleanup(ISC_STATUS* userStatus, isc_db_handle* handle,
2016 AttachmentCleanupRoutine* routine, void* arg)
2017{
2018 StatusVector status(userStatus);
2019 CheckStatusWrapper statusWrapper(&status);
2020
2021 try
2022 {
2023 RefPtr<YAttachment> attachment(translateHandle(attachments, handle));
2024
2025 AutoPtr<CleanupCallbackImpl<YAttachment, AttachmentCleanupRoutine> > callback(
2026 FB_NEW CleanupCallbackImpl<YAttachment, AttachmentCleanupRoutine>(attachment, routine, arg));
2027
2028 attachment->addCleanupHandler(&statusWrapper, callback);
2029
2030 if (!(status.getState() & IStatus::STATE_ERRORS))
2031 callback.release();
2032 }
2033 catch (const Exception& e)
2034 {
2035 e.stuffException(&statusWrapper);
2036 }
2037
2038 return status[1];
2039}
2040
2041
2042// Provide information on database object.

Callers

nothing calls this directly

Calls 5

translateHandleFunction · 0.85
addCleanupHandlerMethod · 0.80
getStateMethod · 0.45
releaseMethod · 0.45
stuffExceptionMethod · 0.45

Tested by

no test coverage detected