-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MySQL JSON backend for ActiveRecord #619
base: master
Are you sure you want to change the base?
Conversation
The internal equality operator seems to have changed. Comparing SQL should be close enough.
Set translations to empty hash by default
Thanks very much for sharing this! I noticed you pulled the commit fixing the Sequel failures, I need to fix that (it "fixes" the failures but doesn't really doing it correctly.) Once I do that I'll have a look at this. |
Oh yeah I thought I'd removed that one from the builds. I'll remove it so don't worry about that 👍 Probably should also remove Rails 5 too actually. |
I did pull that branch, as I noticed the tests were green, and wanted to run the full CI matrix on this PR. I actually had a quick look at adding Sequel support for the JSON column too, and not just adding the ActiveRecord support, but I've never used Sequel and it doesn't seem to support JSON columns without another gem. |
I just noticed some discussion on another issue about the default column value |
We have been using mobility for a few years using the JSON backend with a MySQL 8 JSON column.
I see
a few people(maybe just kule) over the years have put together PRs, but #271 is still marked WIP.The thing I am most unsure about in this PR is the
visit_Mobility_Plugins_Arel_Nodes_JsonDashDoubleArrow
function.Maybe moving that quoting somewhere else would be better - I notice PR #271 from a few years ago has it elsewhere.
As ActiveRecord 4.2 does not support MySQL json columns, I have excluded that test - but I guess it would be possible to run the JSON test only against ActiveRecord 4.2+ and leave support for non-JSON columns... but Rails 4.2.5.1 is 7 years old now...