Skip to content

Allow MyXQL to decode array fields using :json columns types in MariaDB. #668

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

Merged
merged 1 commit into from
May 20, 2025

Conversation

odarriba
Copy link
Contributor

This change allows to use :json type columns to store an arrays of elements in MariaDB-backed applications.

For MySQL databases it was already working because that engine supports a json column type, but for MariaDB it is created as longtext because the engine does not properly support JSON.

That difference avoided ecto_sql to be able to load those values from the database, causing an exception.

Closes #667

@josevalim
Copy link
Member

The CI failure is a heisenbug. It has been fixed in master.

@josevalim josevalim merged commit 6130b05 into elixir-ecto:master May 20, 2025
10 of 11 checks passed
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot load JSON for certain field types using MariaDB
2 participants