mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
How to make generic decode function #6654
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @major200322 on GitHub (Mar 17, 2021).
Hi community, how making a generic decode function
Example
$this->entityManager->createQueryBuilder()
->select("decode("xxx",value,'result',value2,'result2',......,default)")
->from('xxx')
@beberlei commented on GitHub (Mar 18, 2021):
https://www.doctrine-project.org/projects/doctrine-orm/en/2.8/cookbook/dql-user-defined-functions.html