Registry / database / scienta-doctrine-json-functions

scienta-doctrine-json-functions

JSON →
library6.5.0phppackagistunverified

A set of extensions to Doctrine that add support for json query functions.

composer require scienta/doctrine-json-functions
INSTALL
IMPORT
SIG · SCIENTA-DOCTRINE-J
S
scienta-doctrine-json-functions
databasephpv6.5.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

JsonContains
use Scienta\DoctrineJsonFunctions\Query\AST\Functions\Json\JsonContains;

Query using JSON_CONTAINS function

use Scienta\DoctrineJsonFunctions\Query\AST\Functions\Json\JsonContains; $query = $entityManager->createQuery("SELECT u FROM App\Entity\User u WHERE JSON_CONTAINS(u.roles, :role) = 1"); $query->setParameter('role', '"admin"');
Debug
Known issues
breakingRequires Doctrine ORM 2.5+ and MySQL 5.7+ or PostgreSQL 9.4+
fix
Ensure your database supports JSON functions
affects: >=6.0
Upgrade
Version history
6.5.0latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
45 hits · last 30 days
node
38
OpenAI (training)
2
Resources
scienta-doctrine-json-functions — pip install scienta-doctrine-json-functions · libregistry