Fix python binding

This commit is contained in:
Thomas Krijnen
2025-03-14 10:20:22 +01:00
parent df6b7a34f7
commit 10682fb226
9 changed files with 89 additions and 32 deletions
+3 -1
View File
@@ -73,7 +73,9 @@ namespace {
return array_.storage_ptr->index(index_);
} else {
std::string str;
array_.db_ptr->db->Get(rocksdb::ReadOptions{}, (is_entity ? "i|" : "t|") + std::to_string(instance_name_) + "|" + std::to_string(index_), &str);
if (!array_.db_ptr->db->Get(rocksdb::ReadOptions{}, (is_entity ? "i|" : "t|") + std::to_string(instance_name_) + "|" + std::to_string(index_), &str).ok()) {
return TypeEncoder::encode_type<boost::blank>() - 'A';
}
return (size_t) str[0] - 'A';
}
}