You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can you please add support for calling database functions with Jinq?
In JPA 2.1 Support for calling database functions was added. It can be reviewed in the JPA 2.1 Specification on Page 193:
4.6.17.3 Invocation of Predefined and User-defined Database Functions
The invocation of functions other than the built-in functions of the Java Persistence query language is supported by means of the function_invocation syntax. This includes the invocation of predefined database functions and user-defined database functions.
In eclipselink it is implemented since version 2.4, i don't know about hibernate though.
I would have the following suggestions:
Add .function(...)
I imagine this to be the simpler one to implement but rather hard and inflexible to use
Let users add java-method-references with their database-function-string to JinqJPAStreamProvider
For example Math.ceil() could be added and translated like this:
SELECTb.name, FUNCTION("CEIL", b.price) FROM Book b
How would this work for non-static methods? If I have the instance of an object and mapped one of this object's methods, could this case still be analyzed?
The text was updated successfully, but these errors were encountered:
Yes, I've been thinking of this. It isn't a big change. But as an open-source project, Jinq doesn't make any money, so I haven't had the cycles to look at doing this. Unless someone absolutely needs this functionality, I probably won't get around to looking at this until December at the earliest.
Can you please add support for calling database functions with Jinq?
In JPA 2.1 Support for calling database functions was added. It can be reviewed in the JPA 2.1 Specification on Page 193:
In eclipselink it is implemented since version 2.4, i don't know about hibernate though.
I would have the following suggestions:
Add
.function(...)
I imagine this to be the simpler one to implement but rather hard and inflexible to use
Let users add java-method-references with their database-function-string to
JinqJPAStreamProvider
For example
Math.ceil()
could be added and translated like this:could get translated into
How would this work for non-static methods? If I have the instance of an object and mapped one of this object's methods, could this case still be analyzed?
The text was updated successfully, but these errors were encountered: