Closed
Description
What problem does this solve or what need does it fill?
While trying to write a new Query parameter, I need to figure out which storage type a specific component has.
I can only search over the tables
field of my Storages
, rather than being able to check directly.
This is frustratingly indirect and will result in subtle bugs if and when we add more storage types.
What solution would you like?
Create a lookup(ComponentId) -> StorageType
method on Storages.
What alternative(s) have you considered?
I would prefer to just be able to pass in the type directly, but that's not possible :(
Additional context
Discovered during #2116.
When adding this functionality, we should check all other code accessing Storages to see if it applies to future-proof our work.