DoctrineJsonFunctions icon indicating copy to clipboard operation
DoctrineJsonFunctions copied to clipboard

What is Postgresql configuration?

Open Forticas opened this issue 2 years ago • 1 comments

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

Forticas avatar Dec 06 '22 10:12 Forticas

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

chrisnoden avatar Jun 03 '23 11:06 chrisnoden