DoctrineJsonFunctions icon indicating copy to clipboard operation
DoctrineJsonFunctions copied to clipboard

JSON_EXTRACT missing in MariaDB

Open igoooor opened this issue 1 year ago • 4 comments

I can use JSON_EXTRACT in MariaDB, but the package here does not seem to support it since I updated to symfony 7 & doctrine/dbal 4

I'm not sure what additional information I could provide to help debug that. But also on the README of the project, JSON_EXTRACT is not listed in the MariaDB column.

igoooor avatar Jun 07 '24 10:06 igoooor

I think some others might be missing, I could find a lot in https://mariadb.com/kb/en/json-functions/

igoooor avatar Jun 07 '24 11:06 igoooor

You can use Scienta\DoctrineJsonFunctions\Query\AST\Functions\Mysql\JsonExtract with mariaDB too !

Btw, that's not the only one that will work with both.

victor-prdh avatar Jun 25 '24 12:06 victor-prdh

Sorry if I was not clear in my initial message, but that's what I mean, it does not work with my setup, it gives me the following error: Operation "JSON_EXTRACT" is not supported by platform. Here are some more info on my setup:

  • I am using mariadb 10.8 as database
  • DATABASE_URL=mysql://symfony:symfony@local-db:3306/symfony?serverVersion=10.8.5-MariaDB
  • my doctrine packages:
"doctrine/annotations": "^2.0", # 2.0.1
"doctrine/doctrine-bundle": "^2.2", # 2.12.0
"doctrine/doctrine-migrations-bundle": "^3.0", # 3.3.1
"doctrine/orm": "3.*", 3.2.0

Which are all up to date with latest version. Let me know if I can provide more info. Thanks

igoooor avatar Jun 26 '24 07:06 igoooor

Hey, sorry for the delay.

I created this small test: https://github.com/victor-prdh/test-maria.

It's working well for me. Do you have a small reproducer by any chance?

victor-prdh avatar Jul 05 '24 22:07 victor-prdh

Just as a note, I have created PR that should solve the issue. If you could test and review the PR it would surely help :panda_face:

Lustmored avatar Oct 07 '24 09:10 Lustmored

seems that none of functions work with MariaDB and doctrine dbal v4. Can confirm, that @Lustmored PR fixes and makes it work again :rocket:

rmikalkenas avatar Oct 08 '24 11:10 rmikalkenas