terminusdb / terminusdb-store

a tokio-enabled data store for triple data

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Have some easy way to translate an object id to a node or value if it is known which one it should be

matko opened this issue · comments

Currently we have layer.id_object(object_id) which translates an object id into an ObjectType, which is an enum which could either be Node(String) or Value(String). In many scenarios, due to some underlying schema, we may know exactly which of these two it is going to be. It would be good to have a shortcut to getting to the right object type, where, if it turns out it is actually the other type, we're allowed to panic.