diff --git a/src/ifcparse/IfcParse.cpp b/src/ifcparse/IfcParse.cpp index 595abe167b..55e040eb0f 100644 --- a/src/ifcparse/IfcParse.cpp +++ b/src/ifcparse/IfcParse.cpp @@ -2471,7 +2471,20 @@ std::vector IfcFile::get_inverse_indices(int instance_id) { } } } else if constexpr (std::is_same_v, impl::rocks_db_file_storage>) { - // @todo + // @todo no lower/upper_bounds() implemented yet + auto prefix = "v|" + std::to_string(instance_id) + "|"; + auto it = x.db->NewIterator(rocksdb::ReadOptions()); + it->Seek(prefix); + while (it->Valid() && it->key().starts_with(prefix)) { + std::vector vals(it->value().size() / sizeof(uint32_t)); + memcpy(vals.data(), it->value().data(), it->value().size()); + auto tuple = key_from_string>(it->key().ToString().substr(2)); + for (auto& i : vals) { + mapping[i].push_back(std::get<2>(tuple)); + } + it->Next(); + } + } }, storage_);