mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-14 11:24:19 +00:00
Working non-streaming serializer and read-only model
This commit is contained in:
@@ -2436,15 +2436,16 @@ aggregate_of_instance::ptr IfcFile::getInverse(int instance_id, const IfcParse::
|
||||
} else if constexpr (std::is_same_v<std::decay_t<decltype(x)>, impl::rocks_db_file_storage>) {
|
||||
if (attribute_index == -1) {
|
||||
// @todo no lower/upper_bounds() implemented yet
|
||||
auto prefix = "v|" + std::to_string(instance_id) + "|";
|
||||
auto prefix = "v|" + std::to_string(instance_id) + "|" + std::to_string(ent->index_in_schema()) + "|";
|
||||
auto it = x.db->NewIterator(rocksdb::ReadOptions());
|
||||
it->Seek(prefix);
|
||||
while (it->Valid() && it->key().starts_with(prefix)) {
|
||||
std::vector<size_t> vals(it->value().size() / sizeof(size_t));
|
||||
std::vector<uint32_t> vals(it->value().size() / sizeof(uint32_t));
|
||||
memcpy(vals.data(), it->value().data(), it->value().size());
|
||||
for (auto& v : vals) {
|
||||
return_value->push(instance_by_id(v));
|
||||
}
|
||||
it->Next();
|
||||
}
|
||||
} else {
|
||||
auto it = x.byref_excl_.find({ instance_id, ent->index_in_schema(), attribute_index });
|
||||
|
||||
Reference in New Issue
Block a user