This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-dbcp.git
The following commit(s) were added to refs/heads/master by this push:
new a70a78c2 Declutter internals
a70a78c2 is described below
commit a70a78c257ee98b7f7bc4617c43fc1efc521df23
Author: Gary Gregory <[email protected]>
AuthorDate: Sun Jul 10 12:03:16 2022 -0400
Declutter internals
---
.../java/org/apache/commons/dbcp2/PStmtKey.java | 326 +++++----------------
.../org/apache/commons/dbcp2/TestPStmtKey.java | 24 +-
2 files changed, 93 insertions(+), 257 deletions(-)
diff --git a/src/main/java/org/apache/commons/dbcp2/PStmtKey.java
b/src/main/java/org/apache/commons/dbcp2/PStmtKey.java
index 1e631037..e8422986 100644
--- a/src/main/java/org/apache/commons/dbcp2/PStmtKey.java
+++ b/src/main/java/org/apache/commons/dbcp2/PStmtKey.java
@@ -21,7 +21,7 @@ import java.sql.SQLException;
import java.sql.Statement;
import java.util.Arrays;
import java.util.Objects;
-import java.util.function.Supplier;
+import java.util.function.Function;
import org.apache.commons.dbcp2.PoolingConnection.StatementType;
@@ -32,118 +32,34 @@ import
org.apache.commons.dbcp2.PoolingConnection.StatementType;
*/
public class PStmtKey {
- /**
- * Builder for prepareCall(String sql).
- */
- private class PreparedCallSQL implements StatementBuilder {
- @Override
- public Statement createStatement(final Connection connection) throws
SQLException {
- return connection.prepareCall(sql);
- }
- }
-
- /**
- * Builder for prepareCall(String sql, int resultSetType, int
resultSetConcurrency).
- */
- private class PreparedCallWithResultSetConcurrency implements
StatementBuilder {
- @Override
- public Statement createStatement(final Connection connection) throws
SQLException {
- return connection.prepareCall(sql, resultSetType,
resultSetConcurrency);
- }
- }
-
- /**
- * Builder for prepareCall(String sql, int resultSetType, int
resultSetConcurrency, int resultSetHoldability).
- */
- private class PreparedCallWithResultSetHoldability implements
StatementBuilder {
- @Override
- public Statement createStatement(final Connection connection) throws
SQLException {
- return connection.prepareCall(sql, resultSetType,
resultSetConcurrency, resultSetHoldability);
- }
- }
-
- /**
- * Builder for prepareStatement(String sql).
- */
- private class PreparedStatementSQL implements StatementBuilder {
- @Override
- public Statement createStatement(final Connection connection) throws
SQLException {
- return connection.prepareStatement(sql);
- }
- }
-
- /**
- * Builder for prepareStatement(String sql, int autoGeneratedKeys).
- */
- private class PreparedStatementWithAutoGeneratedKeys implements
StatementBuilder {
- @Override
- public Statement createStatement(final Connection connection) throws
SQLException {
- return connection.prepareStatement(sql, autoGeneratedKeys);
- }
- }
-
- /**
- * Builder for prepareStatement(String sql, int[] columnIndexes).
- */
- private class PreparedStatementWithColumnIndexes implements
StatementBuilder {
- @Override
- public Statement createStatement(final Connection connection) throws
SQLException {
- return connection.prepareStatement(sql, columnIndexes);
- }
- }
-
- /**
- * Builder for prepareStatement(String sql, String[] columnNames).
- */
- private class PreparedStatementWithColumnNames implements StatementBuilder
{
- @Override
- public Statement createStatement(final Connection connection) throws
SQLException {
- return connection.prepareStatement(sql, columnNames);
- }
- }
-
- /**
- * Builder for prepareStatement(String sql, int resultSetType, int
resultSetConcurrency).
- */
- private class PreparedStatementWithResultSetConcurrency implements
StatementBuilder {
- @Override
- public Statement createStatement(final Connection connection) throws
SQLException {
- return connection.prepareStatement(sql, resultSetType,
resultSetConcurrency);
- }
- }
-
- /**
- * Builder for prepareStatement(String sql, int resultSetType, int
resultSetConcurrency, int resultSetHoldability).
- */
- private class PreparedStatementWithResultSetHoldability implements
StatementBuilder {
- @Override
- public Statement createStatement(final Connection connection) throws
SQLException {
- return connection.prepareStatement(sql, resultSetType,
resultSetConcurrency, resultSetHoldability);
- }
- }
-
/**
* Interface for Prepared or Callable Statement.
*/
@FunctionalInterface
private interface StatementBuilder {
- Statement createStatement(Connection connection) throws SQLException;
- }
-
- private static StatementBuilder toStatementBuilder(final StatementType
statementType, final Supplier<StatementBuilder> prep,
- final Supplier<StatementBuilder> call) {
- if (statementType != null) {
- switch (statementType) {
- case PREPARED_STATEMENT:
- return prep.get();
- case CALLABLE_STATEMENT:
- return call.get();
- default:
- // TODO Throw?
- return null;
- }
+ Statement createStatement(Connection connection, PStmtKey key) throws
SQLException;
+ }
+
+ private static final StatementBuilder CallConcurrency = (c, k) ->
c.prepareCall(k.sql, k.resultSetType, k.resultSetConcurrency);
+ private static final StatementBuilder CallHoldability = (c, k) ->
c.prepareCall(k.sql, k.resultSetType, k.resultSetConcurrency,
k.resultSetHoldability);
+ private static final StatementBuilder CallSQL = (c, k) ->
c.prepareCall(k.sql);
+ private static final StatementBuilder StatementAutoGeneratedKeys = (c, k)
-> c.prepareStatement(k.sql, k.autoGeneratedKeys);
+ private static final StatementBuilder StatementColumnIndexes = (c, k) ->
c.prepareStatement(k.sql, k.columnIndexes);
+ private static final StatementBuilder StatementColumnNames = (c, k) ->
c.prepareStatement(k.sql, k.columnNames);
+ private static final StatementBuilder StatementConcurrency = (c, k) ->
c.prepareStatement(k.sql, k.resultSetType, k.resultSetConcurrency);
+ private static final StatementBuilder StatementHoldability = (c, k) ->
c.prepareStatement(k.sql, k.resultSetType, k.resultSetConcurrency,
+ k.resultSetHoldability);
+ private static final StatementBuilder StatementSQL = (c, k) ->
c.prepareStatement(k.sql);
+
+ private static StatementBuilder match(final StatementType statementType,
final StatementBuilder prep, final StatementBuilder call) {
+ switch (Objects.requireNonNull(statementType, "statementType")) {
+ case PREPARED_STATEMENT:
+ return prep;
+ case CALLABLE_STATEMENT:
+ return call;
+ default:
+ throw new IllegalArgumentException(statementType.toString());
}
- return null;
}
/**
@@ -169,10 +85,14 @@ public class PStmtKey {
*/
private final Integer resultSetHoldability;
- /** Database catalog. */
+ /**
+ * Database catalog.
+ */
private final String catalog;
- /** Database schema. */
+ /**
+ * Database schema.
+ */
private final String schema;
/**
@@ -191,7 +111,7 @@ public class PStmtKey {
*/
private final String[] columnNames;
- /**
+ /**
* Statement builder.
*/
private final transient StatementBuilder statementBuilder;
@@ -304,17 +224,8 @@ public class PStmtKey {
@Deprecated
public PStmtKey(final String sql, final String catalog, final int
resultSetType, final int resultSetConcurrency, final int resultSetHoldability,
final StatementType statementType) {
- this.sql = sql;
- this.catalog = catalog;
- this.schema = null;
- this.resultSetType = resultSetType;
- this.resultSetConcurrency = resultSetConcurrency;
- this.resultSetHoldability = resultSetHoldability;
- this.statementType = statementType;
- this.autoGeneratedKeys = null;
- this.columnIndexes = null;
- this.columnNames = null;
- this.statementBuilder = toStatementBuilder(statementType,
PreparedStatementWithResultSetHoldability::new,
PreparedCallWithResultSetHoldability::new);
+ this(sql, catalog, null, resultSetType, resultSetConcurrency,
resultSetHoldability, null, null, null, statementType,
+ k -> match(statementType, StatementHoldability, CallHoldability));
}
/**
@@ -331,17 +242,8 @@ public class PStmtKey {
*/
@Deprecated
public PStmtKey(final String sql, final String catalog, final int
resultSetType, final int resultSetConcurrency, final StatementType
statementType) {
- this.sql = sql;
- this.catalog = catalog;
- this.schema = null;
- this.resultSetType = resultSetType;
- this.resultSetConcurrency = resultSetConcurrency;
- this.resultSetHoldability = null;
- this.statementType = statementType;
- this.autoGeneratedKeys = null;
- this.columnIndexes = null;
- this.columnNames = null;
- this.statementBuilder = toStatementBuilder(statementType,
PreparedStatementWithResultSetConcurrency::new,
PreparedCallWithResultSetConcurrency::new);
+ this(sql, catalog, null, resultSetType, resultSetConcurrency, null,
null, null, null, statementType,
+ k -> match(statementType, StatementConcurrency, CallConcurrency));
}
/**
@@ -355,17 +257,7 @@ public class PStmtKey {
*/
@Deprecated
public PStmtKey(final String sql, final String catalog, final int[]
columnIndexes) {
- this.sql = sql;
- this.catalog = catalog;
- this.schema = null;
- this.statementType = StatementType.PREPARED_STATEMENT;
- this.autoGeneratedKeys = null;
- this.columnIndexes = clone(columnIndexes);
- this.columnNames = null;
- this.resultSetType = null;
- this.resultSetConcurrency = null;
- this.resultSetHoldability = null;
- this.statementBuilder = new PreparedStatementWithColumnIndexes();
+ this(sql, catalog, null, null, null, null, null, columnIndexes, null,
StatementType.PREPARED_STATEMENT, StatementColumnIndexes);
}
/**
@@ -378,17 +270,7 @@ public class PStmtKey {
*/
@Deprecated
public PStmtKey(final String sql, final String catalog, final
StatementType statementType) {
- this.sql = sql;
- this.catalog = catalog;
- this.schema = null;
- this.statementType = statementType;
- this.autoGeneratedKeys = null;
- this.columnIndexes = null;
- this.columnNames = null;
- this.resultSetType = null;
- this.resultSetConcurrency = null;
- this.resultSetHoldability = null;
- this.statementBuilder = toStatementBuilder(statementType,
PreparedStatementSQL::new, PreparedCallSQL::new);
+ this(sql, catalog, null, null, null, null, null, null, null,
statementType, k -> match(statementType, StatementSQL, CallSQL));
}
/**
@@ -403,17 +285,8 @@ public class PStmtKey {
*/
@Deprecated
public PStmtKey(final String sql, final String catalog, final
StatementType statementType, final Integer autoGeneratedKeys) {
- this.sql = sql;
- this.catalog = catalog;
- this.schema = null;
- this.statementType = statementType;
- this.autoGeneratedKeys = autoGeneratedKeys;
- this.columnIndexes = null;
- this.columnNames = null;
- this.resultSetType = null;
- this.resultSetConcurrency = null;
- this.resultSetHoldability = null;
- this.statementBuilder = toStatementBuilder(statementType,
PreparedStatementWithAutoGeneratedKeys::new, PreparedCallSQL::new);
+ this(sql, catalog, null, null, null, null, autoGeneratedKeys, null,
null, statementType,
+ k -> match(statementType, StatementAutoGeneratedKeys, CallSQL));
}
/**
@@ -493,17 +366,8 @@ public class PStmtKey {
*/
public PStmtKey(final String sql, final String catalog, final String
schema, final int resultSetType, final int resultSetConcurrency,
final int resultSetHoldability, final StatementType statementType) {
- this.sql = sql;
- this.catalog = catalog;
- this.schema = schema;
- this.resultSetType = resultSetType;
- this.resultSetConcurrency = resultSetConcurrency;
- this.resultSetHoldability = resultSetHoldability;
- this.statementType = statementType;
- this.autoGeneratedKeys = null;
- this.columnIndexes = null;
- this.columnNames = null;
- this.statementBuilder = toStatementBuilder(statementType,
PreparedStatementWithResultSetHoldability::new,
PreparedCallWithResultSetHoldability::new);
+ this(sql, catalog, schema, resultSetType, resultSetConcurrency,
resultSetHoldability, null, null, null, statementType,
+ k -> match(statementType, StatementHoldability, CallHoldability));
}
/**
@@ -521,17 +385,8 @@ public class PStmtKey {
*/
public PStmtKey(final String sql, final String catalog, final String
schema, final int resultSetType, final int resultSetConcurrency,
final StatementType statementType) {
- this.sql = sql;
- this.catalog = catalog;
- this.schema = schema;
- this.resultSetType = resultSetType;
- this.resultSetConcurrency = resultSetConcurrency;
- this.resultSetHoldability = null;
- this.statementType = statementType;
- this.autoGeneratedKeys = null;
- this.columnIndexes = null;
- this.columnNames = null;
- this.statementBuilder = toStatementBuilder(statementType,
PreparedStatementWithResultSetConcurrency::new,
PreparedCallWithResultSetConcurrency::new);
+ this(sql, catalog, schema, resultSetType, resultSetConcurrency, null,
null, null, null, statementType,
+ k -> match(statementType, StatementConcurrency, CallConcurrency));
}
/**
@@ -544,17 +399,40 @@ public class PStmtKey {
* or rows.
*/
public PStmtKey(final String sql, final String catalog, final String
schema, final int[] columnIndexes) {
+ this(sql, catalog, schema, null, null, null, null, columnIndexes,
null, StatementType.PREPARED_STATEMENT, StatementColumnIndexes);
+ }
+
+ private PStmtKey(final String sql, final String catalog, final String
schema, final Integer resultSetType, final Integer resultSetConcurrency,
+ final Integer resultSetHoldability, final Integer autoGeneratedKeys,
final int[] columnIndexes, final String[] columnNames,
+ final StatementType statementType, final Function<PStmtKey,
StatementBuilder> statementBuilder) {
+ this.sql = sql;
+ this.catalog = catalog;
+ this.schema = schema;
+ this.resultSetType = resultSetType;
+ this.resultSetConcurrency = resultSetConcurrency;
+ this.resultSetHoldability = resultSetHoldability;
+ this.autoGeneratedKeys = autoGeneratedKeys;
+ this.columnIndexes = clone(columnIndexes);
+ this.columnNames = clone(columnNames);
+ this.statementBuilder =
Objects.requireNonNull(Objects.requireNonNull(statementBuilder,
"statementBuilder").apply(this), "statementBuilder");
+ this.statementType = statementType;
+ }
+
+ // Root constructor.
+ private PStmtKey(final String sql, final String catalog, final String
schema, final Integer resultSetType, final Integer resultSetConcurrency,
+ final Integer resultSetHoldability, final Integer autoGeneratedKeys,
final int[] columnIndexes, final String[] columnNames,
+ final StatementType statementType, final StatementBuilder
statementBuilder) {
this.sql = sql;
this.catalog = catalog;
this.schema = schema;
- this.statementType = StatementType.PREPARED_STATEMENT;
- this.autoGeneratedKeys = null;
+ this.resultSetType = resultSetType;
+ this.resultSetConcurrency = resultSetConcurrency;
+ this.resultSetHoldability = resultSetHoldability;
+ this.autoGeneratedKeys = autoGeneratedKeys;
this.columnIndexes = clone(columnIndexes);
- this.columnNames = null;
- this.resultSetType = null;
- this.resultSetConcurrency = null;
- this.resultSetHoldability = null;
- this.statementBuilder = new PreparedStatementWithColumnIndexes();
+ this.columnNames = clone(columnNames);
+ this.statementBuilder = Objects.requireNonNull(statementBuilder,
"statementBuilder");
+ this.statementType = statementType;
}
/**
@@ -567,17 +445,7 @@ public class PStmtKey {
* @since 2.5.0
*/
public PStmtKey(final String sql, final String catalog, final String
schema, final StatementType statementType) {
- this.sql = sql;
- this.catalog = catalog;
- this.schema = schema;
- this.statementType = statementType;
- this.autoGeneratedKeys = null;
- this.columnIndexes = null;
- this.columnNames = null;
- this.resultSetType = null;
- this.resultSetConcurrency = null;
- this.resultSetHoldability = null;
- this.statementBuilder = toStatementBuilder(statementType,
PreparedStatementSQL::new, PreparedCallSQL::new);
+ this(sql, catalog, schema, null, null, null, null, null, null,
statementType, k -> match(statementType, StatementSQL, CallSQL));
}
/**
@@ -592,17 +460,8 @@ public class PStmtKey {
* @since 2.5.0
*/
public PStmtKey(final String sql, final String catalog, final String
schema, final StatementType statementType, final Integer autoGeneratedKeys) {
- this.sql = sql;
- this.catalog = catalog;
- this.schema = schema;
- this.statementType = statementType;
- this.autoGeneratedKeys = autoGeneratedKeys;
- this.columnIndexes = null;
- this.columnNames = null;
- this.resultSetType = null;
- this.resultSetConcurrency = null;
- this.resultSetHoldability = null;
- this.statementBuilder = toStatementBuilder(statementType,
PreparedStatementWithAutoGeneratedKeys::new, PreparedCallSQL::new);
+ this(sql, catalog, schema, null, null, null, autoGeneratedKeys, null,
null, statementType,
+ k -> match(statementType, StatementAutoGeneratedKeys, CallSQL));
}
/**
@@ -616,17 +475,7 @@ public class PStmtKey {
* @since 2.5.0
*/
public PStmtKey(final String sql, final String catalog, final String
schema, final String[] columnNames) {
- this.sql = sql;
- this.catalog = catalog;
- this.schema = schema;
- this.statementType = StatementType.PREPARED_STATEMENT;
- this.autoGeneratedKeys = null;
- this.columnIndexes = null;
- this.columnNames = clone(columnNames);
- this.resultSetType = null;
- this.resultSetConcurrency = null;
- this.resultSetHoldability = null;
- this.statementBuilder = new PreparedStatementWithColumnNames();
+ this(sql, catalog, schema, null, null, null, null, null, columnNames,
StatementType.PREPARED_STATEMENT, StatementColumnNames);
}
/**
@@ -640,17 +489,7 @@ public class PStmtKey {
*/
@Deprecated
public PStmtKey(final String sql, final String catalog, final String[]
columnNames) {
- this.sql = sql;
- this.catalog = catalog;
- this.schema = null;
- this.statementType = StatementType.PREPARED_STATEMENT;
- this.autoGeneratedKeys = null;
- this.columnIndexes = null;
- this.columnNames = clone(columnNames);
- this.resultSetType = null;
- this.resultSetConcurrency = null;
- this.resultSetHoldability = null;
- this.statementBuilder = new PreparedStatementWithColumnNames();
+ this(sql, catalog, null, null, null, null, null, null, columnNames,
StatementType.PREPARED_STATEMENT, StatementColumnNames);
}
private int[] clone(final int[] array) {
@@ -669,10 +508,7 @@ public class PStmtKey {
* @throws SQLException Thrown when there is a problem creating the
statement.
*/
public Statement createStatement(final Connection connection) throws
SQLException {
- if (statementBuilder == null) {
- throw new IllegalStateException("Prepared statement key is
invalid.");
- }
- return statementBuilder.createStatement(connection);
+ return statementBuilder.createStatement(connection, this);
}
@Override
@@ -728,7 +564,7 @@ public class PStmtKey {
}
/**
- * The catalog.
+ * Gets the catalog.
*
* @return The catalog.
*/
@@ -785,7 +621,7 @@ public class PStmtKey {
}
/**
- * The schema.
+ * Gets the schema.
*
* @return The catalog.
*/
@@ -803,7 +639,7 @@ public class PStmtKey {
}
/**
- * The SQL statement type.
+ * Gets the SQL statement type.
*
* @return The SQL statement type.
*/
diff --git a/src/test/java/org/apache/commons/dbcp2/TestPStmtKey.java
b/src/test/java/org/apache/commons/dbcp2/TestPStmtKey.java
index 2e8e4979..6d148d70 100644
--- a/src/test/java/org/apache/commons/dbcp2/TestPStmtKey.java
+++ b/src/test/java/org/apache/commons/dbcp2/TestPStmtKey.java
@@ -49,13 +49,13 @@ public class TestPStmtKey {
Assertions.assertNotEquals(new PStmtKey("sql", "catalog1", "schema1",
0, 0, 0),
new PStmtKey("sql", "catalog2", "schema1", 0, 0, 0));
//
- Assertions.assertNotEquals(new PStmtKey("sql", "catalog1", "schema1",
0, 0, 0, null),
- new PStmtKey("sql", "catalog2", "schema1", 0, 0, 0, null));
+ Assertions.assertNotEquals(new PStmtKey("sql", "catalog1", "schema1",
0, 0, 0, StatementType.CALLABLE_STATEMENT),
+ new PStmtKey("sql", "catalog2", "schema1", 0, 0, 0,
StatementType.CALLABLE_STATEMENT));
Assertions.assertNotEquals(new PStmtKey("sql", "catalog1", "schema1",
0, 0, 0, StatementType.PREPARED_STATEMENT),
new PStmtKey("sql", "catalog2", "schema1", 0, 0, 0,
StatementType.PREPARED_STATEMENT));
//
- Assertions.assertNotEquals(new PStmtKey("sql", "catalog1", "schema1",
0, 0, null),
- new PStmtKey("sql", "catalog2", "schema1", 0, 0, null));
+ Assertions.assertNotEquals(new PStmtKey("sql", "catalog1", "schema1",
0, 0, StatementType.CALLABLE_STATEMENT),
+ new PStmtKey("sql", "catalog2", "schema1", 0, 0,
StatementType.CALLABLE_STATEMENT));
Assertions.assertNotEquals(new PStmtKey("sql", "catalog1", "schema1",
0, 0, StatementType.PREPARED_STATEMENT),
new PStmtKey("sql", "catalog2", "schema1", 0, 0,
StatementType.PREPARED_STATEMENT));
//
@@ -87,13 +87,13 @@ public class TestPStmtKey {
Assertions.assertNotEquals(new PStmtKey("sql", "catalog1", "schema1",
0, 0, 0),
new PStmtKey("sql", "catalog1", "schema2", 0, 0, 0));
//
- Assertions.assertNotEquals(new PStmtKey("sql", "catalog1", "schema1",
0, 0, 0, null),
- new PStmtKey("sql", "catalog1", "schema2", 0, 0, 0, null));
+ Assertions.assertNotEquals(new PStmtKey("sql", "catalog1", "schema1",
0, 0, 0, StatementType.CALLABLE_STATEMENT),
+ new PStmtKey("sql", "catalog1", "schema2", 0, 0, 0,
StatementType.CALLABLE_STATEMENT));
Assertions.assertNotEquals(new PStmtKey("sql", "catalog1", "schema1",
0, 0, 0, StatementType.PREPARED_STATEMENT),
new PStmtKey("sql", "catalog1", "schema2", 0, 0, 0,
StatementType.PREPARED_STATEMENT));
//
- Assertions.assertNotEquals(new PStmtKey("sql", "catalog1", "schema1",
0, 0, null),
- new PStmtKey("sql", "catalog1", "schema2", 0, 0, null));
+ Assertions.assertNotEquals(new PStmtKey("sql", "catalog1", "schema1",
0, 0, StatementType.CALLABLE_STATEMENT),
+ new PStmtKey("sql", "catalog1", "schema2", 0, 0,
StatementType.CALLABLE_STATEMENT));
Assertions.assertNotEquals(new PStmtKey("sql", "catalog1", "schema1",
0, 0, StatementType.PREPARED_STATEMENT),
new PStmtKey("sql", "catalog1", "schema2", 0, 0,
StatementType.PREPARED_STATEMENT));
//
@@ -125,13 +125,13 @@ public class TestPStmtKey {
Assertions.assertEquals(new PStmtKey("sql", "catalog1", "schema1", 0,
0, 0),
new PStmtKey("sql", "catalog1", "schema1", 0, 0, 0));
//
- Assertions.assertEquals(new PStmtKey("sql", "catalog1", "schema1", 0,
0, 0, null),
- new PStmtKey("sql", "catalog1", "schema1", 0, 0, 0, null));
+ Assertions.assertEquals(new PStmtKey("sql", "catalog1", "schema1", 0,
0, 0, StatementType.CALLABLE_STATEMENT),
+ new PStmtKey("sql", "catalog1", "schema1", 0, 0, 0,
StatementType.CALLABLE_STATEMENT));
Assertions.assertEquals(new PStmtKey("sql", "catalog1", "schema1", 0,
0, 0, StatementType.PREPARED_STATEMENT),
new PStmtKey("sql", "catalog1", "schema1", 0, 0, 0,
StatementType.PREPARED_STATEMENT));
//
- Assertions.assertEquals(new PStmtKey("sql", "catalog1", "schema1", 0,
0, null),
- new PStmtKey("sql", "catalog1", "schema1", 0, 0, null));
+ Assertions.assertEquals(new PStmtKey("sql", "catalog1", "schema1", 0,
0, StatementType.CALLABLE_STATEMENT),
+ new PStmtKey("sql", "catalog1", "schema1", 0, 0,
StatementType.CALLABLE_STATEMENT));
Assertions.assertEquals(new PStmtKey("sql", "catalog1", "schema1", 0,
0, StatementType.PREPARED_STATEMENT),
new PStmtKey("sql", "catalog1", "schema1", 0, 0,
StatementType.PREPARED_STATEMENT));
//