Closed julienbourdeau closed 1 month ago
Non-primitive types in maps isn’t something we’ve played with.
This implementation does feel like an awkward API in the ActiveRecord sense, however, I don’t have a great alternative to suggest. I wonder if any other AR adapters have tackled this problem and if we can take inspiration from their api implementation?
Thank you for your feedback @danielwestendorf. If you're able to point what makes you feel awkward about the API, I'm happy to try to improve it 🙏
The latest version added support for
Map
(Thank you @danielwestendorf!)At Lago, we forked this gem to add support for map but never took the time to open a PR with our change (sorry!). I'm updating our code to use the gem as much as possible. Our implementation was slightly different but very close.
The big missing feature is support for arrays inside maps like
{ key: [1, 2, 3] }
, which I'm adding in this PR.We'll be running it in production this week and we'll let you know how it goes.
What do you think @danielwestendorf ? Did you get to work with maps of arrays.