/* Find a index using its oid from storage layer, * throw exception if not exists * */ index::Index *StorageManager::GetIndexWithOid(oid_t database_oid, oid_t table_oid, oid_t index_oid) const { // Lookup table from storage layer auto table = GetTableWithOid(database_oid, table_oid); // Throw exception if not exists // Lookup index from storage layer return table->GetIndexWithOid(index_oid) .get(); // Throw exception if not exists }
index::Index *Manager::GetIndexWithOid(const oid_t database_oid, const oid_t table_oid, const oid_t index_oid) const { // Lookup table auto table = GetTableWithOid(database_oid, table_oid); // Lookup index if (table != nullptr) { auto index = table->GetIndexWithOid(index_oid); return index; } return nullptr; }