blaze-persistence
blaze-persistence copied to clipboard
Make BP custom functions available through BlazeCriteriaBuilder
The CriteriaBuilder has some utility methods to create function expressions. BlazeCriteriaBuilder could extend this with the custom functions Blaze Persistence provides. My personal candidate list:
- Group concat aggregation
- Custom builder for window expressions, and methods for the
WINDOW_SUM,WINDOW_MAX,WINDOW_AVG,WINDOW_MIN,WINDOW_COUNT,WINDOW_GROUP_CONCAT,WINDOW_EVERYandWINDOW_OR_AGG,ROW_NUMBER,RANK,DENSE_RANK,PERCENT_RANK,CUME_DIST,NTILE,LEAD,LAG,FIRST_VALUE,LAST_VALUE,NTH_VALUE
Candidates that are perhaps too specific / type bound and are better suited for a dedicated utility API
- Date trunc functions
- Date add functions
- Date extract functions
I believe LEAST, GREATEST , CAST are already provided. Not sure what else makes sense to include.
Description
Expected behavior
Actual behavior
Steps to reproduce
Environment
Version:
JPA-Provider:
DBMS:
Application Server:
https://github.com/Blazebit/blaze-persistence/pull/1383 will add support for most of these functions. The only ones left now are:
- Date trunc functions
- Date add functions
- Date extract functions