-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
[5.2] Added correct MySQL JSON bool handling and updating grammar #13242
Conversation
Wasn't this already added to 5.3? |
If so, could you point out where? |
Can't remember., Maybe it wasn't merged? |
Merged, but have seen after the fact it doesn't seem to work for me at all. Boolean columns are not updated. No error is generated. Just nothing happens. |
Looks to me like bindings for booleans aren't removed on update. So you end up with this kind of query: http://d.pr/i/1gvcH Note that there are more bindings than placeholders. |
I fixed the JSON updates with booleans. |
Can you add a test so it doesn't break again? |
Alright. I will do so in a bit. Cheers! |
Bool literals are now correctly inserted into statements that use a JSON column. E.g.
Previously this was only possible using
DB::raw('true')
.Additionally the update grammar has been updated, so that JSON fields in the update array are recognized as such and make use of the
JSON_SET
function.See code and tests for details and also see #13232 for the discussion to the where issue.