可用版本: Dev (3.21) | 最新版 (3.20) | 3.19 | 3.18

展平CASE缩写

适用于 ✅ 开源版   ✅ 专业版   ✅ 企业版

NVLCOALESCE CASE 简写可以嵌套,但这并不能增加查询的价值或清晰度。因此,我们会展开它们。

使用 Settings.transformPatternsFlattenCaseAbbreviation,可以实现以下转换

-- With Settings.transformPatternsFlattenCaseAbbreviation active, this:
SELECT
  NVL(NVL(a, b), c),
  COALESCE(NVL(a, b), c, NVL(d, e))
  COALESCE(a, COALESCE(b, c, d), e)
FROM tab;

-- ... is transformed into the equivalent expression:
SELECT
  COALESCE(a, b, c),
  COALESCE(a, b, c, d, e),
  COALESCE(a, b, c, d, e)
FROM tab;

反馈

您对此页面有任何反馈吗? 我们很乐意听取您的意见!

The jOOQ Logo