mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
Write GlobalId index when serializing to RocksDB
rocks_db_file_storage already exposes a `g|`-prefixed guid -> instance name map, but RocksDbSerializer never populated it, so by_guid() on a converted file always threw. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -115,6 +115,11 @@ def test_rocks():
|
||||
b = f.key_value_store_query(f"t|{iden}|0")[1:]
|
||||
assert set(struct.unpack("Q", b[i : i + 8])[0] for i in range(1, len(b), 9)) == {136, 138}
|
||||
|
||||
g = ifcopenshell.open(fn)
|
||||
for inst in g.by_type("IfcRoot"):
|
||||
assert f.by_guid(inst.GlobalId).id() == inst.id()
|
||||
|
||||
del g
|
||||
del f
|
||||
gc.collect()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user