DoctrineJsonFunctions
DoctrineJsonFunctions copied to clipboard
What is Postgresql configuration?
Hello ,
this is symfony configuration for MySQL:
# config/packages/doctrine.yaml
doctrine:
orm:
dql:
string_functions:
JSON_EXTRACT: Scienta\DoctrineJsonFunctions\Query\AST\Functions\Mysql\JsonExtract
JSON_SEARCH: Scienta\DoctrineJsonFunctions\Query\AST\Functions\Mysql\JsonSearch
What is the configuration for Postgresql? Thank's
fundamentally the same, but the final definitions would be the Postgresql functions you want: eg
# config/packages/doctrine.yaml
doctrine:
orm:
dql:
string_functions:
JSONB_EXISTS: Scienta\DoctrineJsonFunctions\Query\AST\Functions\Postgresql\JsonbExists
JSONB_EXISTS_ANY: Scienta\DoctrineJsonFunctions\Query\AST\Functions\Postgresql\JsonbExistsAny