-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NFR]: Registering custom expressions in PHQL Dialects like PostgreSQL @@ Expression #14954
Comments
Another suggestion is to allow adding conditions with "native" mark, so it is not processed by PHQL, but left as it is. I think it would be much simpler solution to implement / code. Something like:
In that case condition and binding are not processed by PHQL but left for final PDO execution, with binds merged with PHQL binds. |
I've also created list of non-standard operators in PostgreSQL: and full list of operators: https://github.com/tztztztz/List-of-all-PostgreSQL-10-operators/blob/master/full-list.txt |
Tracked in #14608 |
Is your feature request related to a problem? Please describe.
I MUST use this kind of condition in PHQL:
to_tsvector('English', cast(client_data_original as TEXT)) @@ plainto_tsquery('English', ':cdo_ftxt:')
There are two problems:
plainto_tsquery('English', ':cdo_ftxt:')
I need to set explicit value without parametrizing it, like this:
plainto_tsquery('English', 'John Smith')
How can I modify PostgreSQL dialect in Phalcon source code to recognize such expressions?
Describe the solution you'd like
It would be ideal if we have way to register custom expressions to any dialect in similar way to register functions via registerCustomFunction method.
For example in PostgreSQL there are many very useful expressions to work with jsonb data type like: "|&>", "@>", "#>" etc. Currently I can't use them and it hurts.
Fixing those two problem would level up Phalcon ORM to higher level.
The text was updated successfully, but these errors were encountered: