From ea5af2f9d69fe7d5e197b3f8dff127c3bc3920b7 Mon Sep 17 00:00:00 2001 From: lukaseder Date: Fri, 4 Jan 2019 09:54:07 +0100 Subject: [PATCH] [#8163] Deprecate synonym keywords and use suffix underscore instead --- .../resources/org/jooq/web/manual-3.12.xml | 22 +++---- .../main/java/org/jooq/CaseConditionStep.java | 27 ++++++++ jOOQ/src/main/java/org/jooq/CaseWhenStep.java | 18 +++++ jOOQ/src/main/java/org/jooq/PivotForStep.java | 7 ++ .../org/jooq/impl/CaseConditionStepImpl.java | 29 +++++++-- .../java/org/jooq/impl/CaseWhenStepImpl.java | 22 +++++-- jOOQ/src/main/java/org/jooq/impl/DSL.java | 65 ++++++++++++++++--- jOOQ/src/main/java/org/jooq/impl/Pivot.java | 14 ++-- 8 files changed, 167 insertions(+), 37 deletions(-) diff --git a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.12.xml b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.12.xml index 73508b29da..80a43d74b6 100644 --- a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.12.xml +++ b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.12.xml @@ -5525,10 +5525,10 @@ ORDER BY CASE TITLE ]]> 

@@ -8661,18 +8661,18 @@ END]]> + .else_("unknown");]]>

- In jOOQ, both syntaxes are supported (The second one is emulated in Derby, which only knows the first one). Unfortunately, both case and else are reserved words in Java. jOOQ chose to use decode() from the Oracle DECODE function, or choose(), and otherwise(), which means the same as else. + In jOOQ, both syntaxes are supported (The second one is emulated in Derby, which only knows the first one). Unfortunately, both case and else are reserved words in Java. jOOQ chose to use decode() from the Oracle DECODE function, or choose() / case_(), and otherwise() / else_().

@@ -20753,18 +20753,18 @@ WHEN_MATCHED_THEN_UPDATE()

- jOOQ replaces those keywords by "synonyms": + jOOQ uses a suffix on those keywords to prevent a collision:

CASE .. ELSE PIVOT .. FOR .. IN .. -decode() .. otherwise() -pivot(..).on(..).in(..) +case_() .. else_() +pivot(..).for_(..).in(..)

- There is more future collision potential with: + There is more future collision potential with, each resolved with a suffix: