From cd2e208b6a92c4a956db90f5d2830dabd0942b40 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Thu, 17 Sep 2026 20:48:13 +1000 Subject: [PATCH] ifcparse: build the RocksDB inverse prefix in all_referencing_instances with rocksdb_key Since #9508 the numeric key segments are fixed-width hex; the one hand-built "v|" + std::to_string(id) prefix wouldn't have matched. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01HNrXDmR88wKPCYwGE21SyH --- src/ifcparse/parse.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ifcparse/parse.cpp b/src/ifcparse/parse.cpp index fac05fef0a..aaa75e0bc4 100644 --- a/src/ifcparse/parse.cpp +++ b/src/ifcparse/parse.cpp @@ -3173,7 +3173,7 @@ bool file::all_referencing_instances(int instance_id, const std::function, impl::rocks_db_file_storage>) { // @todo no lower/upper_bounds() implemented yet - auto prefix = "v|" + std::to_string(instance_id) + "|"; + auto prefix = rocksdb_key::inverse_prefix(instance_id); auto it = std::unique_ptr(x.db->NewIterator(rocksdb::ReadOptions())); it->Seek(prefix); while (it->Valid() && it->key().starts_with(prefix)) {