cayenne icon indicating copy to clipboard operation
cayenne copied to clipboard

CAY-2597 `case-when` implementation

Open stariy95 opened this issue 1 year ago • 0 comments

PR brings support for the CASE-WHEN SQL operator to the Cayenne expression API.

Usage example (from the test):

Expression caseWhen = ExpressionFactory.caseWhen(
                List.of(Artist.PAINTING_ARRAY.dot(Painting.ESTIMATED_PRICE).between(BigDecimal.ZERO, BigDecimal.valueOf(50)),
                        Artist.PAINTING_ARRAY.dot(Painting.ESTIMATED_PRICE).between(BigDecimal.valueOf(51), BigDecimal.valueOf(100))),
                List.of(Artist.ARTIST_NAME.getExpression(),
                        Artist.DATE_OF_BIRTH.getExpression()));

This PR supersedes #593

stariy95 avatar Jun 20 '24 13:06 stariy95