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

Method removeStatement

src/dsql/DsqlStatementCache.cpp:159–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157}
158
159void DsqlStatementCache::removeStatement(thread_db* tdbb, DsqlStatement* statement)
160{
161 if (const auto cacheKey = statement->getCacheKey())
162 {
163 if (const auto entryPtr = map.get(cacheKey))
164 {
165 const auto entry = *entryPtr;
166
167 map.remove(entry->key);
168 entry->dsqlStatement->resetCacheKey();
169
170 if (entry->active)
171 {
172 entry->dsqlStatement->addRef();
173 activeStatementList.erase(entry);
174 }
175 else
176 {
177 cacheSize -= entry->size;
178 inactiveStatementList.erase(entry);
179 }
180 }
181 }
182}
183
184void DsqlStatementCache::statementGoingInactive(Firebird::RefStrPtr& key)
185{

Callers 1

destroyMethod · 0.80

Calls 6

getCacheKeyMethod · 0.80
resetCacheKeyMethod · 0.80
getMethod · 0.45
removeMethod · 0.45
addRefMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected