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

Method isAvailable

src/jrd/extds/IscDS.cpp:302–313  ·  view source on GitHub ↗

this ISC connection instance is available for the current execution context if it a) has no active statements or supports many active statements and b) has no active transactions or has active transaction of given TraScope bound to current jrd transaction or supports many active transactions

Source from the content-addressed store, hash-verified

300// TraScope bound to current jrd transaction or supports many active
301// transactions
302bool IscConnection::isAvailable(thread_db* tdbb, TraScope traScope) const
303{
304 if (m_used_stmts && !testFeature(fb_feature_multi_statements))
305 return false;
306
307 if (m_transactions.getCount() && !testFeature(fb_feature_multi_transactions) && !findTransaction(tdbb, traScope))
308 {
309 return false;
310 }
311
312 return true;
313}
314
315bool IscConnection::validate(Jrd::thread_db* tdbb)
316{

Callers 1

getBoundConnectionMethod · 0.45

Calls 1

getCountMethod · 0.45

Tested by

no test coverage detected