terminusdb-store
terminusdb-store copied to clipboard
Have a way to extract values from typed dicts when the underlying storage format is known
We have two big storage format kinds, namely stringy and biginty. These are all saved in typed dicts in exactly the same format, and therefore can be extracted in exactly the same way as well.
Currently, the interface forces you to know about the exact type of a value to extract it. This is annoying for these kinds, because calling code might not care about the exact type but only about the fact that something is a stringy. This comes up in the graphql code for terminusdb, where we filter on and return stringy values in exactly the same way for each of them, but have to write a big match statement matching on all the stringy types to support them.
It'd be good if we had a generic way to extract the stringies and biginties as String or Bigint without having to know the exadt data type.