From 879e28dfb77f72f3b053084905c2e0f5d2e26a00 Mon Sep 17 00:00:00 2001 From: lukaseder Date: Mon, 5 Jun 2017 21:47:49 +0200 Subject: [PATCH] [#6312] Document DISTINCT predicate emulation using INTERSECT --- jOOQ/src/main/java/org/jooq/Field.java | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/jOOQ/src/main/java/org/jooq/Field.java b/jOOQ/src/main/java/org/jooq/Field.java index 063f914fec..f5f3dfa175 100644 --- a/jOOQ/src/main/java/org/jooq/Field.java +++ b/jOOQ/src/main/java/org/jooq/Field.java @@ -1058,6 +1058,12 @@ public interface Field extends SelectField, GroupField, FieldOrRow { * In {@link SQLDialect#SQLITE}, this can be emulated through *
[this] IS NOT [value]
*

+ * In databases that support INTERSECT (see + * {@link Select#intersect(Select)}, this predicate can be emulated as + * follows:

+     * NOT EXISTS (SELECT [this] INTERSECT SELECT [value])
+     * 
+ *

* If this is not supported by the underlying database, jOOQ will render * this instead:

      * CASE WHEN [this] IS     NULL AND [value] IS     NULL THEN FALSE
@@ -1081,6 +1087,12 @@ public interface Field extends SelectField, GroupField, FieldOrRow {
      * In {@link SQLDialect#SQLITE}, this can be emulated through
      * 
[this] IS NOT [value]
*

+ * In databases that support INTERSECT (see + * {@link Select#intersect(Select)}, this predicate can be emulated as + * follows:

+     * NOT EXISTS (SELECT [this] INTERSECT SELECT [value])
+     * 
+ *

* If this is not supported by the underlying database, jOOQ will render * this instead:

      * CASE WHEN [this] IS     NULL AND [field] IS     NULL THEN FALSE
@@ -1104,6 +1116,12 @@ public interface Field extends SelectField, GroupField, FieldOrRow {
      * In {@link SQLDialect#SQLITE}, this can be emulated through
      * 
[this] IS [value]
*

+ * In databases that support INTERSECT (see + * {@link Select#intersect(Select)}, this predicate can be emulated as + * follows:

+     * EXISTS (SELECT [this] INTERSECT SELECT [value])
+     * 
+ *

* If this is not supported by the underlying database, jOOQ will render * this instead:

      * CASE WHEN [this] IS     NULL AND [value] IS     NULL THEN TRUE
@@ -1127,6 +1145,12 @@ public interface Field extends SelectField, GroupField, FieldOrRow {
      * In {@link SQLDialect#SQLITE}, this can be emulated through
      * 
[this] IS [value]
*

+ * In databases that support INTERSECT (see + * {@link Select#intersect(Select)}, this predicate can be emulated as + * follows:

+     * EXISTS (SELECT [this] INTERSECT SELECT [value])
+     * 
+ *

* If this is not supported by the underlying database, jOOQ will render * this instead:

      * CASE WHEN [this] IS     NULL AND [field] IS     NULL THEN TRUE