Details
-
Task
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Cayenne supports SQL functions since 4.0 but only a limited set common for all supported DBs.
There are a lot more SQL functions provided by each DB that can't be supported by Cayenne directly. So we need a way to allow calls to this functions for users.
For the Property API it can be implemented as
<T> function(String functionName, Class<T> resultType, Object... arguments) { // ... }
For the Expressions API we can use syntax like this:
Expression exp = exp("fn('SQL_FUNCTION', db:some.path, 123)")
This will cover almost all use cases with the exception of SQL functions with special syntax, like
OVERLAY ( 'foo bar' PLACING 'baz' FROM 5 )