@@ -371,6 +371,8 @@ class MetadataCache : public Firebird::PermanentStorage
371371 return mdc_generators.lookup (id, name);
372372 }
373373
374+ // Ensure old (current) version of object is loaded into cache
375+
374376 template <typename C>
375377 static C* oldVersion (thread_db* tdbb, MetaId id, ObjectBase::Flag scanType)
376378 {
@@ -379,20 +381,26 @@ class MetadataCache : public Firebird::PermanentStorage
379381 return vrsn ? getPermanent (vrsn) : nullptr ;
380382 }
381383
384+ // Create new version of object in cache (if not exists)
385+
382386 template <typename C>
383387 static C* newVersion (thread_db* tdbb, MetaId id)
384388 {
385389 auto & vector = Vector<C>::get (getCache (tdbb));
386390 return vector.newVersion (tdbb, id);
387391 }
388392
393+ // Mark object in cache as dropped
394+
389395 template <typename C>
390396 static C* erase (thread_db* tdbb, MetaId id)
391397 {
392398 auto & vector = Vector<C>::get (getCache (tdbb));
393399 return vector.erase (tdbb, id);
394400 }
395401
402+ // Get versioned part of cached object by ID or name
403+
396404 template <typename C, typename V = C::Versioned>
397405 static V* getVersioned (thread_db* tdbb, MetaId id, ObjectBase::Flag flags)
398406 {
@@ -411,6 +419,8 @@ class MetadataCache : public Firebird::PermanentStorage
411419 return rc;
412420 }
413421
422+ // Get permanent part of cached object by ID or name
423+
414424 template <typename C>
415425 static C* getPerm (thread_db* tdbb, MetaId id, ObjectBase::Flag flags)
416426 {
0 commit comments