I’m implementing some ROM relations with the :memory adapter and have a failing test that seems like it should work. Calling the delete command doesn’t seem to delete tuples. Looking at the ROM tests for Memory-related commands, it seems the delete command is not in the test suite.
Could it be related to the relation criteria or how the storage is configured?
Please report an issue if you can confirm that it’s broken. FWIW I would love to make memory adapter truly first-class, as it can become an abstract API for other adapters, like rom-yaml/csv/git etc.
OK. That was my question, whether I should post an issue rather than a Discourse post. I’ll fork ROM and see if I can create some failing tests and PR that.
The reason the datastore uses hashes is because of the recommendation to use hashes when persisting. However, with this Memory datastore, it seems there needs to be a way to convert structs to hashes for comparison only.
The issue with the solution above is that the tuples returned from the delete command are now Hashes instead of Structs.
While this solves the comparison, it technically breaks the typing of the result set (even if we are discarding it in our use case).
Is this approach in the right direction, ROM-wise?
P.S. I like changesets… is there a feature of changesets that can help address this issue of proper type comparison and then properly typed result set?