diff --git a/jOOQ/src/main/java/org/jooq/DiagnosticsContext.java b/jOOQ/src/main/java/org/jooq/DiagnosticsContext.java
index 5077d3546b..fd56bce13b 100644
--- a/jOOQ/src/main/java/org/jooq/DiagnosticsContext.java
+++ b/jOOQ/src/main/java/org/jooq/DiagnosticsContext.java
@@ -53,7 +53,8 @@ import org.jetbrains.annotations.Nullable;
public interface DiagnosticsContext extends Scope {
/**
- * The object that was diagnosed if available, or null, if there was no specific {@link QueryPart} to attach the diagnostic to.
+ * The object that was diagnosed if available, or null, if
+ * there was no specific {@link QueryPart} to attach the diagnostic to.
*/
@Nullable
QueryPart part();
@@ -94,8 +95,8 @@ public interface DiagnosticsContext extends Scope {
int resultSetFetchedRows();
/**
- * The number of columns that were consumed from the {@link #resultSet()}, or
- * -1 if there was no result set.
+ * The number of columns that were consumed from the {@link #resultSet()},
+ * or -1 if there was no result set.
*
* If the result set is still being consumed (i.e. prior to the
* {@link ResultSet#close()} call), then this will return the number of
@@ -111,8 +112,8 @@ public interface DiagnosticsContext extends Scope {
int resultSetFetchedColumnCount();
/**
- * The number of columns that were consumed from the {@link #resultSet()}, or
- * -1 if there was no result set.
+ * The number of columns that were consumed from the {@link #resultSet()},
+ * or -1 if there was no result set.
*
* If the result set is still being consumed (i.e. prior to the * {@link ResultSet#close()} call), then this will return the number of @@ -174,6 +175,11 @@ public interface DiagnosticsContext extends Scope { /** * The duplicate statements that all correspond to a single normalised * statement. + *
+ * This set is used by at least: + *
+ * This set is used by at least: + *
+ * Diagnostics are turned off if no {@link org.jooq.Configuration#diagnosticsListenerProviders()} are configured. + * Once configured, this diagnostic is turned on by default. + *
+ * This feature is available in the commercial distribution only. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isDiagnosticsConsecutiveAggregation() { + return diagnosticsConsecutiveAggregation; + } + + /** + * Sets the value of the diagnosticsConsecutiveAggregation property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setDiagnosticsConsecutiveAggregation(Boolean value) { + this.diagnosticsConsecutiveAggregation = value; + } + /** * Whether to run the {@link org.jooq.DiagnosticsListener#tooManyColumnsFetched(org.jooq.DiagnosticsContext) diagnostic. *
@@ -4869,6 +4900,11 @@ public class Settings
return this;
}
+ public Settings withDiagnosticsConsecutiveAggregation(Boolean value) {
+ setDiagnosticsConsecutiveAggregation(value);
+ return this;
+ }
+
public Settings withDiagnosticsTooManyColumnsFetched(Boolean value) {
setDiagnosticsTooManyColumnsFetched(value);
return this;
@@ -5927,6 +5963,7 @@ public class Settings
builder.append("diagnosticsDuplicateStatementsUsingTransformPatterns", diagnosticsDuplicateStatementsUsingTransformPatterns);
builder.append("diagnosticsMissingWasNullCall", diagnosticsMissingWasNullCall);
builder.append("diagnosticsRepeatedStatements", diagnosticsRepeatedStatements);
+ builder.append("diagnosticsConsecutiveAggregation", diagnosticsConsecutiveAggregation);
builder.append("diagnosticsTooManyColumnsFetched", diagnosticsTooManyColumnsFetched);
builder.append("diagnosticsTooManyRowsFetched", diagnosticsTooManyRowsFetched);
builder.append("diagnosticsUnnecessaryWasNullCall", diagnosticsUnnecessaryWasNullCall);
@@ -6418,6 +6455,15 @@ public class Settings
return false;
}
}
+ if (diagnosticsConsecutiveAggregation == null) {
+ if (other.diagnosticsConsecutiveAggregation!= null) {
+ return false;
+ }
+ } else {
+ if (!diagnosticsConsecutiveAggregation.equals(other.diagnosticsConsecutiveAggregation)) {
+ return false;
+ }
+ }
if (diagnosticsTooManyColumnsFetched == null) {
if (other.diagnosticsTooManyColumnsFetched!= null) {
return false;
@@ -7695,6 +7741,7 @@ public class Settings
result = ((prime*result)+((diagnosticsDuplicateStatementsUsingTransformPatterns == null)? 0 :diagnosticsDuplicateStatementsUsingTransformPatterns.hashCode()));
result = ((prime*result)+((diagnosticsMissingWasNullCall == null)? 0 :diagnosticsMissingWasNullCall.hashCode()));
result = ((prime*result)+((diagnosticsRepeatedStatements == null)? 0 :diagnosticsRepeatedStatements.hashCode()));
+ result = ((prime*result)+((diagnosticsConsecutiveAggregation == null)? 0 :diagnosticsConsecutiveAggregation.hashCode()));
result = ((prime*result)+((diagnosticsTooManyColumnsFetched == null)? 0 :diagnosticsTooManyColumnsFetched.hashCode()));
result = ((prime*result)+((diagnosticsTooManyRowsFetched == null)? 0 :diagnosticsTooManyRowsFetched.hashCode()));
result = ((prime*result)+((diagnosticsUnnecessaryWasNullCall == null)? 0 :diagnosticsUnnecessaryWasNullCall.hashCode()));
diff --git a/jOOQ/src/main/java/org/jooq/impl/DiagnosticsConnection.java b/jOOQ/src/main/java/org/jooq/impl/DiagnosticsConnection.java
index 0a006fd6a4..6eb8d7f037 100644
--- a/jOOQ/src/main/java/org/jooq/impl/DiagnosticsConnection.java
+++ b/jOOQ/src/main/java/org/jooq/impl/DiagnosticsConnection.java
@@ -38,15 +38,20 @@
package org.jooq.impl;
import static java.lang.Boolean.FALSE;
+import static java.util.Arrays.asList;
import static java.util.Collections.synchronizedMap;
// ...
+// ...
import static org.jooq.conf.ParamType.FORCE_INDEXED;
+import static org.jooq.impl.DSL.count;
+import static org.jooq.impl.DSL.noCondition;
import java.sql.CallableStatement;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
@@ -55,14 +60,17 @@ import java.util.Map.Entry;
import java.util.Set;
import java.util.function.Predicate;
+import org.jooq.AggregateFunction;
import org.jooq.Condition;
import org.jooq.Configuration;
import org.jooq.Parser;
// ...
import org.jooq.Queries;
+import org.jooq.Query;
import org.jooq.QueryPart;
import org.jooq.RenderContext;
// ...
+import org.jooq.Select;
import org.jooq.conf.Settings;
import org.jooq.impl.QOM.Eq;
import org.jooq.tools.jdbc.DefaultConnection;
@@ -73,15 +81,16 @@ import org.jooq.tools.jdbc.DefaultConnection;
final class DiagnosticsConnection extends DefaultConnection {
// TODO: Make these configurable
- static final int LRU_SIZE_GLOBAL = 50000;
- static final int LRU_SIZE_LOCAL = 500;
- static final int DUP_SIZE = 500;
+ static final int LRU_SIZE_GLOBAL = 50000;
+ static final int LRU_SIZE_LOCAL = 500;
+ static final int DUP_SIZE = 500;
- final Map
+This feature is available in the commercial distribution only.]]>