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

Method isSameDatabase

src/jrd/extds/InternalDS.cpp:269–295  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

267}
268
269bool InternalConnection::isSameDatabase(const PathName& dbName, ClumpletReader& dpb, const CryptHash& ch) const
270{
271 if (isCurrent())
272 {
273 const Attachment* att = m_attachment->getHandle();
274 const MetaString& attUser = att->getUserName();
275 const MetaString& attRole = att->getSqlRole();
276
277 MetaString str;
278
279 if (dpb.find(isc_dpb_user_name))
280 {
281 dpb.getString(str);
282 if (str != attUser)
283 return false;
284 }
285
286 if (dpb.find(isc_dpb_sql_role_name))
287 {
288 dpb.getString(str);
289 if (str != attRole)
290 return false;
291 }
292 }
293
294 return Connection::isSameDatabase(dbName, dpb, ch);
295}
296
297Transaction* InternalConnection::doCreateTransaction()
298{

Callers

nothing calls this directly

Calls 4

getHandleMethod · 0.45
getUserNameMethod · 0.45
findMethod · 0.45
getStringMethod · 0.45

Tested by

no test coverage detected