blaze-persistence icon indicating copy to clipboard operation
blaze-persistence copied to clipboard

Make BP custom functions available through BlazeCriteriaBuilder

Open jwgmeligmeyling opened this issue 6 years ago • 1 comments

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_EVERY and WINDOW_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:

jwgmeligmeyling avatar Dec 27 '19 08:12 jwgmeligmeyling

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

beikov avatar Nov 21 '21 18:11 beikov