Doctrine Query Language functions for working with the Jsonb type for databases such as: PostgreSQL
Database | Function |
---|---|
PostgreSQL | JSONB_CONTAINS , JSONB_KEY_EXISTS , JSONB_MERGE |
composer require emrdev/jsonb-dql
# config\packages\doctrine.yaml
doctrine:
orm:
dql:
string_functions:
JSONB_CONTAINS: Emrdev\JsonbDql\Doctrine\PostgreSQL\JsonbContains
If you are using DoctrineExtensions with Symfony read How to Register custom DQL Functions.