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

Method getKnownPagesCount

src/jrd/Database.cpp:507–519  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

505 // Methods encapsulating operations with vectors of known pages
506
507 ULONG Database::getKnownPagesCount(SCHAR ptype)
508 {
509 fb_assert(ptype == pag_transactions || ptype == pag_ids);
510
511 SyncLockGuard guard(&dbb_pages_sync, SYNC_SHARED, FB_FUNCTION);
512
513 const auto vector =
514 (ptype == pag_transactions) ? dbb_tip_pages :
515 (ptype == pag_ids) ? dbb_gen_pages :
516 nullptr;
517
518 return vector ? (ULONG) vector->count() : 0;
519 }
520
521 ULONG Database::getKnownPage(SCHAR ptype, ULONG sequence)
522 {

Callers 4

createDatabaseMethod · 0.80
walk_generatorsMethod · 0.80
walk_tipMethod · 0.80
inventory_pageFunction · 0.80

Calls 1

countMethod · 0.45

Tested by

no test coverage detected