emomaliev / jsonb-dql

Library for working with Jsonb type in Doctrine Query Language

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JsonbDql

Doctrine Query Language functions for working with the Jsonb type for databases such as: PostgreSQL

Supported functions

Database Function
PostgreSQL JSONB_CONTAINS , JSONB_KEY_EXISTS , JSONB_MERGE

Installation

composer require emrdev/jsonb-dql

Example of registering the desired functions

# 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.

About

Library for working with Jsonb type in Doctrine Query Language


Languages

Language:PHP 100.0%