This is an automated email from the ASF dual-hosted git repository. ptupitsyn pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/ignite-3.git
The following commit(s) were added to refs/heads/main by this push: new 32ec17b1a IGNITE-17034 Rename JDBC packages and classes to separate them from Ignite SQL API (#824) 32ec17b1a is described below commit 32ec17b1a88a36a2becb2f1b83fea5324d2a6c96 Author: Pavel Tupitsyn <ptupit...@apache.org> AuthorDate: Thu May 26 09:37:40 2022 +0300 IGNITE-17034 Rename JDBC packages and classes to separate them from Ignite SQL API (#824) JDBC and general-purpose SQL APIs can't use the same client requests and should be clearly separated. --- .../ignite/internal/client/proto/ClientOp.java | 18 +++--- .../jdbc/proto}/ClientMessage.java | 2 +- .../jdbc/proto}/IgniteQueryErrorCode.java | 2 +- .../jdbc/proto}/JdbcQueryEventHandler.java | 38 ++++++------- .../jdbc/proto}/JdbcStatementType.java | 2 +- .../jdbc/proto}/SqlStateCode.java | 2 +- .../jdbc/proto}/event/BatchExecuteRequest.java | 4 +- .../jdbc/proto}/event/BatchExecuteResult.java | 2 +- .../proto}/event/BatchPreparedStmntRequest.java | 4 +- .../jdbc/proto}/event/ClientMessageUtils.java | 2 +- .../jdbc/proto}/event/JdbcColumnMeta.java | 2 +- .../jdbc/proto}/event/JdbcMetaColumnsRequest.java | 4 +- .../jdbc/proto}/event/JdbcMetaColumnsResult.java | 2 +- .../proto}/event/JdbcMetaPrimaryKeysRequest.java | 4 +- .../proto}/event/JdbcMetaPrimaryKeysResult.java | 2 +- .../jdbc/proto}/event/JdbcMetaSchemasRequest.java | 4 +- .../jdbc/proto}/event/JdbcMetaSchemasResult.java | 2 +- .../jdbc/proto}/event/JdbcMetaTablesRequest.java | 4 +- .../jdbc/proto}/event/JdbcMetaTablesResult.java | 2 +- .../jdbc/proto}/event/JdbcPrimaryKeyMeta.java | 4 +- .../proto}/event/JdbcQueryMetadataRequest.java | 4 +- .../jdbc/proto}/event/JdbcTableMeta.java | 2 +- .../jdbc/proto}/event/QueryCloseRequest.java | 4 +- .../jdbc/proto}/event/QueryCloseResult.java | 2 +- .../jdbc/proto}/event/QueryExecuteRequest.java | 6 +- .../jdbc/proto}/event/QueryExecuteResult.java | 2 +- .../jdbc/proto}/event/QueryFetchRequest.java | 4 +- .../jdbc/proto}/event/QueryFetchResult.java | 2 +- .../jdbc/proto}/event/QuerySingleResult.java | 2 +- .../jdbc/proto}/event/Response.java | 4 +- .../jdbc/proto}/event/package-info.java | 2 +- .../jdbc/proto}/package-info.java | 4 +- .../handler/ClientInboundMessageHandler.java | 64 +++++++++++----------- .../client/handler/JdbcQueryEventHandlerImpl.java | 54 +++++++++--------- .../ClientJdbcCloseRequest.java} | 10 ++-- .../ClientJdbcColumnMetadataRequest.java} | 10 ++-- .../ClientJdbcExecuteBatchRequest.java} | 10 ++-- .../ClientJdbcExecuteRequest.java} | 10 ++-- .../ClientJdbcFetchRequest.java} | 10 ++-- .../ClientJdbcPreparedStmntBatchRequest.java} | 10 ++-- .../ClientJdbcPrimaryKeyMetadataRequest.java} | 10 ++-- .../ClientJdbcQueryMetadataRequest.java} | 10 ++-- .../ClientJdbcSchemasMetadataRequest.java} | 10 ++-- .../ClientJdbcTableMetadataRequest.java} | 10 ++-- .../{sql => jdbc}/JdbcMetadataCatalog.java | 8 +-- .../requests/{sql => jdbc}/JdbcQueryCursor.java | 4 +- .../requests/{sql => jdbc}/package-info.java | 2 +- .../apache/ignite/internal/client/ClientUtils.java | 18 +++--- .../ignite/internal/client/TcpIgniteClient.java | 2 +- .../internal/jdbc/ConnectionPropertiesImpl.java | 2 +- .../JdbcClientQueryEventHandler.java | 58 ++++++++++---------- .../ignite/internal/jdbc/JdbcConnection.java | 9 ++- .../ignite/internal/jdbc/JdbcDatabaseMetadata.java | 24 ++++---- .../internal/jdbc/JdbcPreparedStatement.java | 10 ++-- .../apache/ignite/internal/jdbc/JdbcResultSet.java | 20 +++---- .../internal/jdbc/JdbcResultSetMetadata.java | 4 +- .../apache/ignite/internal/jdbc/JdbcStatement.java | 16 +++--- .../runner/app/jdbc/ItJdbcBatchSelfTest.java | 4 +- .../runner/app/jdbc/ItJdbcConnectionSelfTest.java | 2 +- .../app/jdbc/ItJdbcErrorsAbstractSelfTest.java | 14 ++--- .../runner/app/jdbc/ItJdbcErrorsSelfTest.java | 6 +- 61 files changed, 282 insertions(+), 283 deletions(-) diff --git a/modules/client-common/src/main/java/org/apache/ignite/internal/client/proto/ClientOp.java b/modules/client-common/src/main/java/org/apache/ignite/internal/client/proto/ClientOp.java index 5950b36b1..49f9f577d 100644 --- a/modules/client-common/src/main/java/org/apache/ignite/internal/client/proto/ClientOp.java +++ b/modules/client-common/src/main/java/org/apache/ignite/internal/client/proto/ClientOp.java @@ -82,31 +82,31 @@ public class ClientOp { public static final int TUPLE_CONTAINS_KEY = 33; /** Execute sql query. */ - public static final int SQL_EXEC = 34; + public static final int JDBC_EXEC = 34; /** Get next batch by query cursor. */ - public static final int SQL_NEXT = 35; + public static final int JDBC_NEXT = 35; /** Execute batch query. */ - public static final int SQL_EXEC_BATCH = 36; + public static final int JDBC_EXEC_BATCH = 36; /** Close query cursor. */ - public static final int SQL_CURSOR_CLOSE = 37; + public static final int JDBC_CURSOR_CLOSE = 37; /** Get table metadata. */ - public static final int SQL_TABLE_META = 38; + public static final int JDBC_TABLE_META = 38; /** Get column metadata. */ - public static final int SQL_COLUMN_META = 39; + public static final int JDBC_COLUMN_META = 39; /** Get schemas list. */ - public static final int SQL_SCHEMAS_META = 40; + public static final int JDBC_SCHEMAS_META = 40; /** Get primary key metadata. */ - public static final int SQL_PK_META = 41; + public static final int JDBC_PK_META = 41; /** Get query metadata. */ - public static final int SQL_QUERY_META = 42; + public static final int JDBC_QUERY_META = 42; /** Begin transaction. */ public static final int TX_BEGIN = 43; diff --git a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/ClientMessage.java b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/ClientMessage.java similarity index 96% rename from modules/client-common/src/main/java/org/apache/ignite/client/proto/query/ClientMessage.java rename to modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/ClientMessage.java index 66fb9b8ee..74eaa533a 100644 --- a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/ClientMessage.java +++ b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/ClientMessage.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.ignite.client.proto.query; +package org.apache.ignite.internal.jdbc.proto; import org.apache.ignite.internal.client.proto.ClientMessagePacker; import org.apache.ignite.internal.client.proto.ClientMessageUnpacker; diff --git a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/IgniteQueryErrorCode.java b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/IgniteQueryErrorCode.java similarity index 98% rename from modules/client-common/src/main/java/org/apache/ignite/client/proto/query/IgniteQueryErrorCode.java rename to modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/IgniteQueryErrorCode.java index 271932bcf..5a2a0560f 100644 --- a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/IgniteQueryErrorCode.java +++ b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/IgniteQueryErrorCode.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.ignite.client.proto.query; +package org.apache.ignite.internal.jdbc.proto; import java.sql.SQLException; diff --git a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/JdbcQueryEventHandler.java b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/JdbcQueryEventHandler.java similarity index 71% rename from modules/client-common/src/main/java/org/apache/ignite/client/proto/query/JdbcQueryEventHandler.java rename to modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/JdbcQueryEventHandler.java index 61cc8624d..407d1edbf 100644 --- a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/JdbcQueryEventHandler.java +++ b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/JdbcQueryEventHandler.java @@ -15,27 +15,27 @@ * limitations under the License. */ -package org.apache.ignite.client.proto.query; +package org.apache.ignite.internal.jdbc.proto; import java.util.concurrent.CompletableFuture; -import org.apache.ignite.client.proto.query.event.BatchExecuteRequest; -import org.apache.ignite.client.proto.query.event.BatchExecuteResult; -import org.apache.ignite.client.proto.query.event.BatchPreparedStmntRequest; -import org.apache.ignite.client.proto.query.event.JdbcMetaColumnsRequest; -import org.apache.ignite.client.proto.query.event.JdbcMetaColumnsResult; -import org.apache.ignite.client.proto.query.event.JdbcMetaPrimaryKeysRequest; -import org.apache.ignite.client.proto.query.event.JdbcMetaPrimaryKeysResult; -import org.apache.ignite.client.proto.query.event.JdbcMetaSchemasRequest; -import org.apache.ignite.client.proto.query.event.JdbcMetaSchemasResult; -import org.apache.ignite.client.proto.query.event.JdbcMetaTablesRequest; -import org.apache.ignite.client.proto.query.event.JdbcMetaTablesResult; -import org.apache.ignite.client.proto.query.event.JdbcQueryMetadataRequest; -import org.apache.ignite.client.proto.query.event.QueryCloseRequest; -import org.apache.ignite.client.proto.query.event.QueryCloseResult; -import org.apache.ignite.client.proto.query.event.QueryExecuteRequest; -import org.apache.ignite.client.proto.query.event.QueryExecuteResult; -import org.apache.ignite.client.proto.query.event.QueryFetchRequest; -import org.apache.ignite.client.proto.query.event.QueryFetchResult; +import org.apache.ignite.internal.jdbc.proto.event.BatchExecuteRequest; +import org.apache.ignite.internal.jdbc.proto.event.BatchExecuteResult; +import org.apache.ignite.internal.jdbc.proto.event.BatchPreparedStmntRequest; +import org.apache.ignite.internal.jdbc.proto.event.JdbcMetaColumnsRequest; +import org.apache.ignite.internal.jdbc.proto.event.JdbcMetaColumnsResult; +import org.apache.ignite.internal.jdbc.proto.event.JdbcMetaPrimaryKeysRequest; +import org.apache.ignite.internal.jdbc.proto.event.JdbcMetaPrimaryKeysResult; +import org.apache.ignite.internal.jdbc.proto.event.JdbcMetaSchemasRequest; +import org.apache.ignite.internal.jdbc.proto.event.JdbcMetaSchemasResult; +import org.apache.ignite.internal.jdbc.proto.event.JdbcMetaTablesRequest; +import org.apache.ignite.internal.jdbc.proto.event.JdbcMetaTablesResult; +import org.apache.ignite.internal.jdbc.proto.event.JdbcQueryMetadataRequest; +import org.apache.ignite.internal.jdbc.proto.event.QueryCloseRequest; +import org.apache.ignite.internal.jdbc.proto.event.QueryCloseResult; +import org.apache.ignite.internal.jdbc.proto.event.QueryExecuteRequest; +import org.apache.ignite.internal.jdbc.proto.event.QueryExecuteResult; +import org.apache.ignite.internal.jdbc.proto.event.QueryFetchRequest; +import org.apache.ignite.internal.jdbc.proto.event.QueryFetchResult; /** * Jdbc client request handler. diff --git a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/JdbcStatementType.java b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/JdbcStatementType.java similarity index 97% rename from modules/client-common/src/main/java/org/apache/ignite/client/proto/query/JdbcStatementType.java rename to modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/JdbcStatementType.java index be0262059..d856781a8 100644 --- a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/JdbcStatementType.java +++ b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/JdbcStatementType.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.ignite.client.proto.query; +package org.apache.ignite.internal.jdbc.proto; import java.util.Arrays; import java.util.Map; diff --git a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/SqlStateCode.java b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/SqlStateCode.java similarity index 98% rename from modules/client-common/src/main/java/org/apache/ignite/client/proto/query/SqlStateCode.java rename to modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/SqlStateCode.java index 828c79162..327f41aa2 100644 --- a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/SqlStateCode.java +++ b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/SqlStateCode.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.ignite.client.proto.query; +package org.apache.ignite.internal.jdbc.proto; /** * SQL state codes. diff --git a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/BatchExecuteRequest.java b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/BatchExecuteRequest.java similarity index 96% rename from modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/BatchExecuteRequest.java rename to modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/BatchExecuteRequest.java index 2e4923f0e..ee9683475 100644 --- a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/BatchExecuteRequest.java +++ b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/BatchExecuteRequest.java @@ -15,13 +15,13 @@ * limitations under the License. */ -package org.apache.ignite.client.proto.query.event; +package org.apache.ignite.internal.jdbc.proto.event; import java.util.ArrayList; import java.util.List; -import org.apache.ignite.client.proto.query.ClientMessage; import org.apache.ignite.internal.client.proto.ClientMessagePacker; import org.apache.ignite.internal.client.proto.ClientMessageUnpacker; +import org.apache.ignite.internal.jdbc.proto.ClientMessage; import org.apache.ignite.internal.tostring.S; import org.apache.ignite.internal.util.CollectionUtils; diff --git a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/BatchExecuteResult.java b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/BatchExecuteResult.java similarity index 98% rename from modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/BatchExecuteResult.java rename to modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/BatchExecuteResult.java index f7fb625be..187106b16 100644 --- a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/BatchExecuteResult.java +++ b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/BatchExecuteResult.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.ignite.client.proto.query.event; +package org.apache.ignite.internal.jdbc.proto.event; import java.util.Objects; import org.apache.ignite.internal.client.proto.ClientMessagePacker; diff --git a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/BatchPreparedStmntRequest.java b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/BatchPreparedStmntRequest.java similarity index 96% rename from modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/BatchPreparedStmntRequest.java rename to modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/BatchPreparedStmntRequest.java index 689a107dd..a66e4b4a9 100644 --- a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/BatchPreparedStmntRequest.java +++ b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/BatchPreparedStmntRequest.java @@ -15,14 +15,14 @@ * limitations under the License. */ -package org.apache.ignite.client.proto.query.event; +package org.apache.ignite.internal.jdbc.proto.event; import io.netty.util.internal.StringUtil; import java.util.ArrayList; import java.util.List; -import org.apache.ignite.client.proto.query.ClientMessage; import org.apache.ignite.internal.client.proto.ClientMessagePacker; import org.apache.ignite.internal.client.proto.ClientMessageUnpacker; +import org.apache.ignite.internal.jdbc.proto.ClientMessage; import org.apache.ignite.internal.tostring.S; import org.apache.ignite.internal.util.CollectionUtils; diff --git a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/ClientMessageUtils.java b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/ClientMessageUtils.java similarity index 97% rename from modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/ClientMessageUtils.java rename to modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/ClientMessageUtils.java index a49097ac9..eabc16a58 100644 --- a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/ClientMessageUtils.java +++ b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/ClientMessageUtils.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.ignite.client.proto.query.event; +package org.apache.ignite.internal.jdbc.proto.event; import org.apache.ignite.internal.client.proto.ClientMessagePacker; import org.apache.ignite.internal.client.proto.ClientMessageUnpacker; diff --git a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/JdbcColumnMeta.java b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/JdbcColumnMeta.java similarity index 99% rename from modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/JdbcColumnMeta.java rename to modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/JdbcColumnMeta.java index ee52a2b22..6f7ef810f 100644 --- a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/JdbcColumnMeta.java +++ b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/JdbcColumnMeta.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.ignite.client.proto.query.event; +package org.apache.ignite.internal.jdbc.proto.event; import static java.sql.Types.BIGINT; import static java.sql.Types.BINARY; diff --git a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/JdbcMetaColumnsRequest.java b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/JdbcMetaColumnsRequest.java similarity index 96% rename from modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/JdbcMetaColumnsRequest.java rename to modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/JdbcMetaColumnsRequest.java index 582506235..09aa197c6 100644 --- a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/JdbcMetaColumnsRequest.java +++ b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/JdbcMetaColumnsRequest.java @@ -15,11 +15,11 @@ * limitations under the License. */ -package org.apache.ignite.client.proto.query.event; +package org.apache.ignite.internal.jdbc.proto.event; -import org.apache.ignite.client.proto.query.ClientMessage; import org.apache.ignite.internal.client.proto.ClientMessagePacker; import org.apache.ignite.internal.client.proto.ClientMessageUnpacker; +import org.apache.ignite.internal.jdbc.proto.ClientMessage; import org.apache.ignite.internal.tostring.S; /** diff --git a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/JdbcMetaColumnsResult.java b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/JdbcMetaColumnsResult.java similarity index 98% rename from modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/JdbcMetaColumnsResult.java rename to modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/JdbcMetaColumnsResult.java index 7f060b117..4fae6056d 100644 --- a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/JdbcMetaColumnsResult.java +++ b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/JdbcMetaColumnsResult.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.ignite.client.proto.query.event; +package org.apache.ignite.internal.jdbc.proto.event; import java.util.ArrayList; import java.util.Collection; diff --git a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/JdbcMetaPrimaryKeysRequest.java b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/JdbcMetaPrimaryKeysRequest.java similarity index 95% rename from modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/JdbcMetaPrimaryKeysRequest.java rename to modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/JdbcMetaPrimaryKeysRequest.java index 4344e207e..5196001a1 100644 --- a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/JdbcMetaPrimaryKeysRequest.java +++ b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/JdbcMetaPrimaryKeysRequest.java @@ -15,11 +15,11 @@ * limitations under the License. */ -package org.apache.ignite.client.proto.query.event; +package org.apache.ignite.internal.jdbc.proto.event; -import org.apache.ignite.client.proto.query.ClientMessage; import org.apache.ignite.internal.client.proto.ClientMessagePacker; import org.apache.ignite.internal.client.proto.ClientMessageUnpacker; +import org.apache.ignite.internal.jdbc.proto.ClientMessage; import org.apache.ignite.internal.tostring.S; /** diff --git a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/JdbcMetaPrimaryKeysResult.java b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/JdbcMetaPrimaryKeysResult.java similarity index 98% rename from modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/JdbcMetaPrimaryKeysResult.java rename to modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/JdbcMetaPrimaryKeysResult.java index 8e9cfb94e..afce864b0 100644 --- a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/JdbcMetaPrimaryKeysResult.java +++ b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/JdbcMetaPrimaryKeysResult.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.ignite.client.proto.query.event; +package org.apache.ignite.internal.jdbc.proto.event; import java.util.ArrayList; import java.util.Collection; diff --git a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/JdbcMetaSchemasRequest.java b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/JdbcMetaSchemasRequest.java similarity index 94% rename from modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/JdbcMetaSchemasRequest.java rename to modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/JdbcMetaSchemasRequest.java index 181b63756..4778c1478 100644 --- a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/JdbcMetaSchemasRequest.java +++ b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/JdbcMetaSchemasRequest.java @@ -15,11 +15,11 @@ * limitations under the License. */ -package org.apache.ignite.client.proto.query.event; +package org.apache.ignite.internal.jdbc.proto.event; -import org.apache.ignite.client.proto.query.ClientMessage; import org.apache.ignite.internal.client.proto.ClientMessagePacker; import org.apache.ignite.internal.client.proto.ClientMessageUnpacker; +import org.apache.ignite.internal.jdbc.proto.ClientMessage; import org.apache.ignite.internal.tostring.S; /** diff --git a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/JdbcMetaSchemasResult.java b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/JdbcMetaSchemasResult.java similarity index 98% rename from modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/JdbcMetaSchemasResult.java rename to modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/JdbcMetaSchemasResult.java index 837d1bc04..089b7aed4 100644 --- a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/JdbcMetaSchemasResult.java +++ b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/JdbcMetaSchemasResult.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.ignite.client.proto.query.event; +package org.apache.ignite.internal.jdbc.proto.event; import java.util.ArrayList; import java.util.Collection; diff --git a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/JdbcMetaTablesRequest.java b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/JdbcMetaTablesRequest.java similarity index 96% rename from modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/JdbcMetaTablesRequest.java rename to modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/JdbcMetaTablesRequest.java index 403562f6a..84b336841 100644 --- a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/JdbcMetaTablesRequest.java +++ b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/JdbcMetaTablesRequest.java @@ -15,11 +15,11 @@ * limitations under the License. */ -package org.apache.ignite.client.proto.query.event; +package org.apache.ignite.internal.jdbc.proto.event; -import org.apache.ignite.client.proto.query.ClientMessage; import org.apache.ignite.internal.client.proto.ClientMessagePacker; import org.apache.ignite.internal.client.proto.ClientMessageUnpacker; +import org.apache.ignite.internal.jdbc.proto.ClientMessage; import org.apache.ignite.internal.tostring.S; /** diff --git a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/JdbcMetaTablesResult.java b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/JdbcMetaTablesResult.java similarity index 98% rename from modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/JdbcMetaTablesResult.java rename to modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/JdbcMetaTablesResult.java index 455d79526..008bb9f47 100644 --- a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/JdbcMetaTablesResult.java +++ b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/JdbcMetaTablesResult.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.ignite.client.proto.query.event; +package org.apache.ignite.internal.jdbc.proto.event; import java.util.ArrayList; import java.util.List; diff --git a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/JdbcPrimaryKeyMeta.java b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/JdbcPrimaryKeyMeta.java similarity index 97% rename from modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/JdbcPrimaryKeyMeta.java rename to modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/JdbcPrimaryKeyMeta.java index 02d9de1af..284f25bca 100644 --- a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/JdbcPrimaryKeyMeta.java +++ b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/JdbcPrimaryKeyMeta.java @@ -15,15 +15,15 @@ * limitations under the License. */ -package org.apache.ignite.client.proto.query.event; +package org.apache.ignite.internal.jdbc.proto.event; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Objects; -import org.apache.ignite.client.proto.query.ClientMessage; import org.apache.ignite.internal.client.proto.ClientMessagePacker; import org.apache.ignite.internal.client.proto.ClientMessageUnpacker; +import org.apache.ignite.internal.jdbc.proto.ClientMessage; import org.apache.ignite.internal.tostring.S; /** diff --git a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/JdbcQueryMetadataRequest.java b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/JdbcQueryMetadataRequest.java similarity index 94% rename from modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/JdbcQueryMetadataRequest.java rename to modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/JdbcQueryMetadataRequest.java index 52d98f6d7..4484c006a 100644 --- a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/JdbcQueryMetadataRequest.java +++ b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/JdbcQueryMetadataRequest.java @@ -15,11 +15,11 @@ * limitations under the License. */ -package org.apache.ignite.client.proto.query.event; +package org.apache.ignite.internal.jdbc.proto.event; -import org.apache.ignite.client.proto.query.ClientMessage; import org.apache.ignite.internal.client.proto.ClientMessagePacker; import org.apache.ignite.internal.client.proto.ClientMessageUnpacker; +import org.apache.ignite.internal.jdbc.proto.ClientMessage; import org.apache.ignite.internal.tostring.S; /** diff --git a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/JdbcTableMeta.java b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/JdbcTableMeta.java similarity index 98% rename from modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/JdbcTableMeta.java rename to modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/JdbcTableMeta.java index 554db4810..ea63838e8 100644 --- a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/JdbcTableMeta.java +++ b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/JdbcTableMeta.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.ignite.client.proto.query.event; +package org.apache.ignite.internal.jdbc.proto.event; import java.util.Objects; import org.apache.ignite.internal.client.proto.ClientMessagePacker; diff --git a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/QueryCloseRequest.java b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/QueryCloseRequest.java similarity index 94% rename from modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/QueryCloseRequest.java rename to modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/QueryCloseRequest.java index 027a0d129..a3394a5eb 100644 --- a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/QueryCloseRequest.java +++ b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/QueryCloseRequest.java @@ -15,11 +15,11 @@ * limitations under the License. */ -package org.apache.ignite.client.proto.query.event; +package org.apache.ignite.internal.jdbc.proto.event; -import org.apache.ignite.client.proto.query.ClientMessage; import org.apache.ignite.internal.client.proto.ClientMessagePacker; import org.apache.ignite.internal.client.proto.ClientMessageUnpacker; +import org.apache.ignite.internal.jdbc.proto.ClientMessage; import org.apache.ignite.internal.tostring.S; /** diff --git a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/QueryCloseResult.java b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/QueryCloseResult.java similarity index 96% rename from modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/QueryCloseResult.java rename to modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/QueryCloseResult.java index a5e63ba91..ffd5b2ff4 100644 --- a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/QueryCloseResult.java +++ b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/QueryCloseResult.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.ignite.client.proto.query.event; +package org.apache.ignite.internal.jdbc.proto.event; import org.apache.ignite.internal.tostring.S; diff --git a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/QueryExecuteRequest.java b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/QueryExecuteRequest.java similarity index 95% rename from modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/QueryExecuteRequest.java rename to modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/QueryExecuteRequest.java index 2ecbd471d..a518e5f69 100644 --- a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/QueryExecuteRequest.java +++ b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/QueryExecuteRequest.java @@ -15,13 +15,13 @@ * limitations under the License. */ -package org.apache.ignite.client.proto.query.event; +package org.apache.ignite.internal.jdbc.proto.event; import java.util.Objects; -import org.apache.ignite.client.proto.query.ClientMessage; -import org.apache.ignite.client.proto.query.JdbcStatementType; import org.apache.ignite.internal.client.proto.ClientMessagePacker; import org.apache.ignite.internal.client.proto.ClientMessageUnpacker; +import org.apache.ignite.internal.jdbc.proto.ClientMessage; +import org.apache.ignite.internal.jdbc.proto.JdbcStatementType; import org.apache.ignite.internal.tostring.S; /** diff --git a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/QueryExecuteResult.java b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/QueryExecuteResult.java similarity index 98% rename from modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/QueryExecuteResult.java rename to modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/QueryExecuteResult.java index 526bd0f47..1b1f1039d 100644 --- a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/QueryExecuteResult.java +++ b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/QueryExecuteResult.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.ignite.client.proto.query.event; +package org.apache.ignite.internal.jdbc.proto.event; import java.util.ArrayList; import java.util.Collections; diff --git a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/QueryFetchRequest.java b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/QueryFetchRequest.java similarity index 95% rename from modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/QueryFetchRequest.java rename to modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/QueryFetchRequest.java index 94cc6dc0a..611408d3c 100644 --- a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/QueryFetchRequest.java +++ b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/QueryFetchRequest.java @@ -15,11 +15,11 @@ * limitations under the License. */ -package org.apache.ignite.client.proto.query.event; +package org.apache.ignite.internal.jdbc.proto.event; -import org.apache.ignite.client.proto.query.ClientMessage; import org.apache.ignite.internal.client.proto.ClientMessagePacker; import org.apache.ignite.internal.client.proto.ClientMessageUnpacker; +import org.apache.ignite.internal.jdbc.proto.ClientMessage; import org.apache.ignite.internal.tostring.S; /** diff --git a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/QueryFetchResult.java b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/QueryFetchResult.java similarity index 98% rename from modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/QueryFetchResult.java rename to modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/QueryFetchResult.java index 805d22d06..30bf858f1 100644 --- a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/QueryFetchResult.java +++ b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/QueryFetchResult.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.ignite.client.proto.query.event; +package org.apache.ignite.internal.jdbc.proto.event; import java.util.ArrayList; import java.util.Arrays; diff --git a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/QuerySingleResult.java b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/QuerySingleResult.java similarity index 98% rename from modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/QuerySingleResult.java rename to modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/QuerySingleResult.java index dce28dbbc..9ab613860 100644 --- a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/QuerySingleResult.java +++ b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/QuerySingleResult.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.ignite.client.proto.query.event; +package org.apache.ignite.internal.jdbc.proto.event; import java.util.ArrayList; import java.util.Arrays; diff --git a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/Response.java b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/Response.java similarity index 96% rename from modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/Response.java rename to modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/Response.java index 7a9eef6a5..4a0d940fa 100644 --- a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/Response.java +++ b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/Response.java @@ -15,12 +15,12 @@ * limitations under the License. */ -package org.apache.ignite.client.proto.query.event; +package org.apache.ignite.internal.jdbc.proto.event; import io.netty.util.internal.StringUtil; -import org.apache.ignite.client.proto.query.ClientMessage; import org.apache.ignite.internal.client.proto.ClientMessagePacker; import org.apache.ignite.internal.client.proto.ClientMessageUnpacker; +import org.apache.ignite.internal.jdbc.proto.ClientMessage; import org.apache.ignite.internal.tostring.S; /** diff --git a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/package-info.java b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/package-info.java similarity index 94% rename from modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/package-info.java rename to modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/package-info.java index bf2c00278..5c9957fbf 100644 --- a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/event/package-info.java +++ b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/event/package-info.java @@ -19,4 +19,4 @@ * Ignite thin client jdbc events. */ -package org.apache.ignite.client.proto.query.event; +package org.apache.ignite.internal.jdbc.proto.event; diff --git a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/package-info.java b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/package-info.java similarity index 84% rename from modules/client-common/src/main/java/org/apache/ignite/client/proto/query/package-info.java rename to modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/package-info.java index 633952183..c2f13f548 100644 --- a/modules/client-common/src/main/java/org/apache/ignite/client/proto/query/package-info.java +++ b/modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/proto/package-info.java @@ -16,7 +16,7 @@ */ /** - * Ignite thin client sql query shared logic (client and server: events, state codes, handlers, etc). + * Ignite thin client JDBC query shared logic (client and server: events, state codes, handlers, etc). */ -package org.apache.ignite.client.proto.query; +package org.apache.ignite.internal.jdbc.proto; diff --git a/modules/client-handler/src/main/java/org/apache/ignite/client/handler/ClientInboundMessageHandler.java b/modules/client-handler/src/main/java/org/apache/ignite/client/handler/ClientInboundMessageHandler.java index 8df12d3bf..62a2a7dd5 100644 --- a/modules/client-handler/src/main/java/org/apache/ignite/client/handler/ClientInboundMessageHandler.java +++ b/modules/client-handler/src/main/java/org/apache/ignite/client/handler/ClientInboundMessageHandler.java @@ -27,17 +27,17 @@ import java.util.concurrent.CompletableFuture; import org.apache.ignite.client.handler.requests.cluster.ClientClusterGetNodesRequest; import org.apache.ignite.client.handler.requests.compute.ClientComputeExecuteColocatedRequest; import org.apache.ignite.client.handler.requests.compute.ClientComputeExecuteRequest; -import org.apache.ignite.client.handler.requests.sql.ClientSqlCloseRequest; -import org.apache.ignite.client.handler.requests.sql.ClientSqlColumnMetadataRequest; -import org.apache.ignite.client.handler.requests.sql.ClientSqlExecuteBatchRequest; -import org.apache.ignite.client.handler.requests.sql.ClientSqlExecuteRequest; -import org.apache.ignite.client.handler.requests.sql.ClientSqlFetchRequest; -import org.apache.ignite.client.handler.requests.sql.ClientSqlPreparedStmntBatchRequest; -import org.apache.ignite.client.handler.requests.sql.ClientSqlPrimaryKeyMetadataRequest; -import org.apache.ignite.client.handler.requests.sql.ClientSqlQueryMetadataRequest; -import org.apache.ignite.client.handler.requests.sql.ClientSqlSchemasMetadataRequest; -import org.apache.ignite.client.handler.requests.sql.ClientSqlTableMetadataRequest; -import org.apache.ignite.client.handler.requests.sql.JdbcMetadataCatalog; +import org.apache.ignite.client.handler.requests.jdbc.ClientJdbcCloseRequest; +import org.apache.ignite.client.handler.requests.jdbc.ClientJdbcColumnMetadataRequest; +import org.apache.ignite.client.handler.requests.jdbc.ClientJdbcExecuteBatchRequest; +import org.apache.ignite.client.handler.requests.jdbc.ClientJdbcExecuteRequest; +import org.apache.ignite.client.handler.requests.jdbc.ClientJdbcFetchRequest; +import org.apache.ignite.client.handler.requests.jdbc.ClientJdbcPreparedStmntBatchRequest; +import org.apache.ignite.client.handler.requests.jdbc.ClientJdbcPrimaryKeyMetadataRequest; +import org.apache.ignite.client.handler.requests.jdbc.ClientJdbcQueryMetadataRequest; +import org.apache.ignite.client.handler.requests.jdbc.ClientJdbcSchemasMetadataRequest; +import org.apache.ignite.client.handler.requests.jdbc.ClientJdbcTableMetadataRequest; +import org.apache.ignite.client.handler.requests.jdbc.JdbcMetadataCatalog; import org.apache.ignite.client.handler.requests.table.ClientSchemasGetRequest; import org.apache.ignite.client.handler.requests.table.ClientTableGetRequest; import org.apache.ignite.client.handler.requests.table.ClientTableIdDoesNotExistException; @@ -61,7 +61,6 @@ import org.apache.ignite.client.handler.requests.table.ClientTupleUpsertRequest; import org.apache.ignite.client.handler.requests.tx.ClientTransactionBeginRequest; import org.apache.ignite.client.handler.requests.tx.ClientTransactionCommitRequest; import org.apache.ignite.client.handler.requests.tx.ClientTransactionRollbackRequest; -import org.apache.ignite.client.proto.query.JdbcQueryEventHandler; import org.apache.ignite.compute.IgniteCompute; import org.apache.ignite.configuration.schemas.clientconnector.ClientConnectorView; import org.apache.ignite.internal.client.proto.ClientErrorCode; @@ -71,6 +70,7 @@ import org.apache.ignite.internal.client.proto.ClientMessageUnpacker; import org.apache.ignite.internal.client.proto.ClientOp; import org.apache.ignite.internal.client.proto.ProtocolVersion; import org.apache.ignite.internal.client.proto.ServerMessageType; +import org.apache.ignite.internal.jdbc.proto.JdbcQueryEventHandler; import org.apache.ignite.internal.sql.engine.QueryProcessor; import org.apache.ignite.lang.IgniteException; import org.apache.ignite.lang.IgniteInternalCheckedException; @@ -142,7 +142,7 @@ public class ClientInboundMessageHandler extends ChannelInboundHandlerAdapter { this.compute = compute; this.clusterService = clusterService; - this.jdbcQueryEventHandler = new JdbcQueryEventHandlerImpl(processor, new JdbcMetadataCatalog(igniteTables)); + jdbcQueryEventHandler = new JdbcQueryEventHandlerImpl(processor, new JdbcMetadataCatalog(igniteTables)); } /** {@inheritDoc} */ @@ -382,35 +382,35 @@ public class ClientInboundMessageHandler extends ChannelInboundHandlerAdapter { case ClientOp.TUPLE_CONTAINS_KEY: return ClientTupleContainsKeyRequest.process(in, out, igniteTables, resources); - case ClientOp.SQL_EXEC: - return ClientSqlExecuteRequest.execute(in, out, jdbcQueryEventHandler); + case ClientOp.JDBC_EXEC: + return ClientJdbcExecuteRequest.execute(in, out, jdbcQueryEventHandler); - case ClientOp.SQL_EXEC_BATCH: - return ClientSqlExecuteBatchRequest.process(in, out, jdbcQueryEventHandler); + case ClientOp.JDBC_EXEC_BATCH: + return ClientJdbcExecuteBatchRequest.process(in, out, jdbcQueryEventHandler); case ClientOp.SQL_EXEC_PS_BATCH: - return ClientSqlPreparedStmntBatchRequest.process(in, out, jdbcQueryEventHandler); + return ClientJdbcPreparedStmntBatchRequest.process(in, out, jdbcQueryEventHandler); - case ClientOp.SQL_NEXT: - return ClientSqlFetchRequest.process(in, out, jdbcQueryEventHandler); + case ClientOp.JDBC_NEXT: + return ClientJdbcFetchRequest.process(in, out, jdbcQueryEventHandler); - case ClientOp.SQL_CURSOR_CLOSE: - return ClientSqlCloseRequest.process(in, out, jdbcQueryEventHandler); + case ClientOp.JDBC_CURSOR_CLOSE: + return ClientJdbcCloseRequest.process(in, out, jdbcQueryEventHandler); - case ClientOp.SQL_TABLE_META: - return ClientSqlTableMetadataRequest.process(in, out, jdbcQueryEventHandler); + case ClientOp.JDBC_TABLE_META: + return ClientJdbcTableMetadataRequest.process(in, out, jdbcQueryEventHandler); - case ClientOp.SQL_COLUMN_META: - return ClientSqlColumnMetadataRequest.process(in, out, jdbcQueryEventHandler); + case ClientOp.JDBC_COLUMN_META: + return ClientJdbcColumnMetadataRequest.process(in, out, jdbcQueryEventHandler); - case ClientOp.SQL_SCHEMAS_META: - return ClientSqlSchemasMetadataRequest.process(in, out, jdbcQueryEventHandler); + case ClientOp.JDBC_SCHEMAS_META: + return ClientJdbcSchemasMetadataRequest.process(in, out, jdbcQueryEventHandler); - case ClientOp.SQL_PK_META: - return ClientSqlPrimaryKeyMetadataRequest.process(in, out, jdbcQueryEventHandler); + case ClientOp.JDBC_PK_META: + return ClientJdbcPrimaryKeyMetadataRequest.process(in, out, jdbcQueryEventHandler); - case ClientOp.SQL_QUERY_META: - return ClientSqlQueryMetadataRequest.process(in, out, jdbcQueryEventHandler); + case ClientOp.JDBC_QUERY_META: + return ClientJdbcQueryMetadataRequest.process(in, out, jdbcQueryEventHandler); case ClientOp.TX_BEGIN: return ClientTransactionBeginRequest.process(out, igniteTransactions, resources); diff --git a/modules/client-handler/src/main/java/org/apache/ignite/client/handler/JdbcQueryEventHandlerImpl.java b/modules/client-handler/src/main/java/org/apache/ignite/client/handler/JdbcQueryEventHandlerImpl.java index 1373ab701..3a112265b 100644 --- a/modules/client-handler/src/main/java/org/apache/ignite/client/handler/JdbcQueryEventHandlerImpl.java +++ b/modules/client-handler/src/main/java/org/apache/ignite/client/handler/JdbcQueryEventHandlerImpl.java @@ -17,8 +17,8 @@ package org.apache.ignite.client.handler; -import static org.apache.ignite.client.proto.query.IgniteQueryErrorCode.UNKNOWN; -import static org.apache.ignite.client.proto.query.IgniteQueryErrorCode.UNSUPPORTED_OPERATION; +import static org.apache.ignite.internal.jdbc.proto.IgniteQueryErrorCode.UNKNOWN; +import static org.apache.ignite.internal.jdbc.proto.IgniteQueryErrorCode.UNSUPPORTED_OPERATION; import static org.apache.ignite.internal.util.ArrayUtils.OBJECT_EMPTY_ARRAY; import it.unimi.dsi.fastutil.ints.IntArrayList; @@ -32,31 +32,31 @@ import java.util.concurrent.CompletionStage; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicLong; import java.util.stream.Collectors; -import org.apache.ignite.client.handler.requests.sql.JdbcMetadataCatalog; -import org.apache.ignite.client.handler.requests.sql.JdbcQueryCursor; -import org.apache.ignite.client.proto.query.JdbcQueryEventHandler; -import org.apache.ignite.client.proto.query.JdbcStatementType; -import org.apache.ignite.client.proto.query.event.BatchExecuteRequest; -import org.apache.ignite.client.proto.query.event.BatchExecuteResult; -import org.apache.ignite.client.proto.query.event.BatchPreparedStmntRequest; -import org.apache.ignite.client.proto.query.event.JdbcColumnMeta; -import org.apache.ignite.client.proto.query.event.JdbcMetaColumnsRequest; -import org.apache.ignite.client.proto.query.event.JdbcMetaColumnsResult; -import org.apache.ignite.client.proto.query.event.JdbcMetaPrimaryKeysRequest; -import org.apache.ignite.client.proto.query.event.JdbcMetaPrimaryKeysResult; -import org.apache.ignite.client.proto.query.event.JdbcMetaSchemasRequest; -import org.apache.ignite.client.proto.query.event.JdbcMetaSchemasResult; -import org.apache.ignite.client.proto.query.event.JdbcMetaTablesRequest; -import org.apache.ignite.client.proto.query.event.JdbcMetaTablesResult; -import org.apache.ignite.client.proto.query.event.JdbcQueryMetadataRequest; -import org.apache.ignite.client.proto.query.event.QueryCloseRequest; -import org.apache.ignite.client.proto.query.event.QueryCloseResult; -import org.apache.ignite.client.proto.query.event.QueryExecuteRequest; -import org.apache.ignite.client.proto.query.event.QueryExecuteResult; -import org.apache.ignite.client.proto.query.event.QueryFetchRequest; -import org.apache.ignite.client.proto.query.event.QueryFetchResult; -import org.apache.ignite.client.proto.query.event.QuerySingleResult; -import org.apache.ignite.client.proto.query.event.Response; +import org.apache.ignite.client.handler.requests.jdbc.JdbcMetadataCatalog; +import org.apache.ignite.client.handler.requests.jdbc.JdbcQueryCursor; +import org.apache.ignite.internal.jdbc.proto.JdbcQueryEventHandler; +import org.apache.ignite.internal.jdbc.proto.JdbcStatementType; +import org.apache.ignite.internal.jdbc.proto.event.BatchExecuteRequest; +import org.apache.ignite.internal.jdbc.proto.event.BatchExecuteResult; +import org.apache.ignite.internal.jdbc.proto.event.BatchPreparedStmntRequest; +import org.apache.ignite.internal.jdbc.proto.event.JdbcColumnMeta; +import org.apache.ignite.internal.jdbc.proto.event.JdbcMetaColumnsRequest; +import org.apache.ignite.internal.jdbc.proto.event.JdbcMetaColumnsResult; +import org.apache.ignite.internal.jdbc.proto.event.JdbcMetaPrimaryKeysRequest; +import org.apache.ignite.internal.jdbc.proto.event.JdbcMetaPrimaryKeysResult; +import org.apache.ignite.internal.jdbc.proto.event.JdbcMetaSchemasRequest; +import org.apache.ignite.internal.jdbc.proto.event.JdbcMetaSchemasResult; +import org.apache.ignite.internal.jdbc.proto.event.JdbcMetaTablesRequest; +import org.apache.ignite.internal.jdbc.proto.event.JdbcMetaTablesResult; +import org.apache.ignite.internal.jdbc.proto.event.JdbcQueryMetadataRequest; +import org.apache.ignite.internal.jdbc.proto.event.QueryCloseRequest; +import org.apache.ignite.internal.jdbc.proto.event.QueryCloseResult; +import org.apache.ignite.internal.jdbc.proto.event.QueryExecuteRequest; +import org.apache.ignite.internal.jdbc.proto.event.QueryExecuteResult; +import org.apache.ignite.internal.jdbc.proto.event.QueryFetchRequest; +import org.apache.ignite.internal.jdbc.proto.event.QueryFetchResult; +import org.apache.ignite.internal.jdbc.proto.event.QuerySingleResult; +import org.apache.ignite.internal.jdbc.proto.event.Response; import org.apache.ignite.internal.schema.NativeTypes; import org.apache.ignite.internal.sql.engine.AsyncSqlCursor; import org.apache.ignite.internal.sql.engine.QueryContext; diff --git a/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/ClientSqlCloseRequest.java b/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/jdbc/ClientJdbcCloseRequest.java similarity index 85% rename from modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/ClientSqlCloseRequest.java rename to modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/jdbc/ClientJdbcCloseRequest.java index af1e5138f..7a7ea3655 100644 --- a/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/ClientSqlCloseRequest.java +++ b/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/jdbc/ClientJdbcCloseRequest.java @@ -15,18 +15,18 @@ * limitations under the License. */ -package org.apache.ignite.client.handler.requests.sql; +package org.apache.ignite.client.handler.requests.jdbc; import java.util.concurrent.CompletableFuture; -import org.apache.ignite.client.proto.query.JdbcQueryEventHandler; -import org.apache.ignite.client.proto.query.event.QueryCloseRequest; import org.apache.ignite.internal.client.proto.ClientMessagePacker; import org.apache.ignite.internal.client.proto.ClientMessageUnpacker; +import org.apache.ignite.internal.jdbc.proto.JdbcQueryEventHandler; +import org.apache.ignite.internal.jdbc.proto.event.QueryCloseRequest; /** - * Client sql close request handler. + * Client jdbc close request handler. */ -public class ClientSqlCloseRequest { +public class ClientJdbcCloseRequest { /** * Processes remote {@code JdbcQueryCloseRequest}. * diff --git a/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/ClientSqlColumnMetadataRequest.java b/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/jdbc/ClientJdbcColumnMetadataRequest.java similarity index 84% rename from modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/ClientSqlColumnMetadataRequest.java rename to modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/jdbc/ClientJdbcColumnMetadataRequest.java index 0ef129e96..7afc47795 100644 --- a/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/ClientSqlColumnMetadataRequest.java +++ b/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/jdbc/ClientJdbcColumnMetadataRequest.java @@ -15,18 +15,18 @@ * limitations under the License. */ -package org.apache.ignite.client.handler.requests.sql; +package org.apache.ignite.client.handler.requests.jdbc; import java.util.concurrent.CompletableFuture; -import org.apache.ignite.client.proto.query.JdbcQueryEventHandler; -import org.apache.ignite.client.proto.query.event.JdbcMetaColumnsRequest; import org.apache.ignite.internal.client.proto.ClientMessagePacker; import org.apache.ignite.internal.client.proto.ClientMessageUnpacker; +import org.apache.ignite.internal.jdbc.proto.JdbcQueryEventHandler; +import org.apache.ignite.internal.jdbc.proto.event.JdbcMetaColumnsRequest; /** - * Client sql column metadata request handler. + * Client jdbc column metadata request handler. */ -public class ClientSqlColumnMetadataRequest { +public class ClientJdbcColumnMetadataRequest { /** * Processes remote {@code JdbcMetaColumnsRequest}. * diff --git a/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/ClientSqlExecuteBatchRequest.java b/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/jdbc/ClientJdbcExecuteBatchRequest.java similarity index 85% rename from modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/ClientSqlExecuteBatchRequest.java rename to modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/jdbc/ClientJdbcExecuteBatchRequest.java index f0f2322f1..d64278507 100644 --- a/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/ClientSqlExecuteBatchRequest.java +++ b/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/jdbc/ClientJdbcExecuteBatchRequest.java @@ -15,18 +15,18 @@ * limitations under the License. */ -package org.apache.ignite.client.handler.requests.sql; +package org.apache.ignite.client.handler.requests.jdbc; import java.util.concurrent.CompletableFuture; -import org.apache.ignite.client.proto.query.JdbcQueryEventHandler; -import org.apache.ignite.client.proto.query.event.BatchExecuteRequest; import org.apache.ignite.internal.client.proto.ClientMessagePacker; import org.apache.ignite.internal.client.proto.ClientMessageUnpacker; +import org.apache.ignite.internal.jdbc.proto.JdbcQueryEventHandler; +import org.apache.ignite.internal.jdbc.proto.event.BatchExecuteRequest; /** - * Client sql request handler. + * Client jdbc request handler. */ -public class ClientSqlExecuteBatchRequest { +public class ClientJdbcExecuteBatchRequest { /** * Processes remote {@code JdbcBatchExecuteRequest}. * diff --git a/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/ClientSqlExecuteRequest.java b/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/jdbc/ClientJdbcExecuteRequest.java similarity index 85% rename from modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/ClientSqlExecuteRequest.java rename to modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/jdbc/ClientJdbcExecuteRequest.java index 3a78526e6..c4eca87d3 100644 --- a/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/ClientSqlExecuteRequest.java +++ b/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/jdbc/ClientJdbcExecuteRequest.java @@ -15,18 +15,18 @@ * limitations under the License. */ -package org.apache.ignite.client.handler.requests.sql; +package org.apache.ignite.client.handler.requests.jdbc; import java.util.concurrent.CompletableFuture; -import org.apache.ignite.client.proto.query.JdbcQueryEventHandler; -import org.apache.ignite.client.proto.query.event.QueryExecuteRequest; import org.apache.ignite.internal.client.proto.ClientMessagePacker; import org.apache.ignite.internal.client.proto.ClientMessageUnpacker; +import org.apache.ignite.internal.jdbc.proto.JdbcQueryEventHandler; +import org.apache.ignite.internal.jdbc.proto.event.QueryExecuteRequest; /** - * Client sql request handler. + * Client jdbc request handler. */ -public class ClientSqlExecuteRequest { +public class ClientJdbcExecuteRequest { /** * Processes remote {@code JdbcQueryExecuteRequest}. * diff --git a/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/ClientSqlFetchRequest.java b/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/jdbc/ClientJdbcFetchRequest.java similarity index 85% rename from modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/ClientSqlFetchRequest.java rename to modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/jdbc/ClientJdbcFetchRequest.java index 3168bcfc9..9ba8f163f 100644 --- a/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/ClientSqlFetchRequest.java +++ b/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/jdbc/ClientJdbcFetchRequest.java @@ -15,18 +15,18 @@ * limitations under the License. */ -package org.apache.ignite.client.handler.requests.sql; +package org.apache.ignite.client.handler.requests.jdbc; import java.util.concurrent.CompletableFuture; -import org.apache.ignite.client.proto.query.JdbcQueryEventHandler; -import org.apache.ignite.client.proto.query.event.QueryFetchRequest; import org.apache.ignite.internal.client.proto.ClientMessagePacker; import org.apache.ignite.internal.client.proto.ClientMessageUnpacker; +import org.apache.ignite.internal.jdbc.proto.JdbcQueryEventHandler; +import org.apache.ignite.internal.jdbc.proto.event.QueryFetchRequest; /** - * Client sql request handler. + * Client jdbc request handler. */ -public class ClientSqlFetchRequest { +public class ClientJdbcFetchRequest { /** * Processes remote {@code JdbcQueryFetchRequest}. * diff --git a/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/ClientSqlPreparedStmntBatchRequest.java b/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/jdbc/ClientJdbcPreparedStmntBatchRequest.java similarity index 83% rename from modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/ClientSqlPreparedStmntBatchRequest.java rename to modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/jdbc/ClientJdbcPreparedStmntBatchRequest.java index b70ee8067..8fdf65eb7 100644 --- a/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/ClientSqlPreparedStmntBatchRequest.java +++ b/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/jdbc/ClientJdbcPreparedStmntBatchRequest.java @@ -15,18 +15,18 @@ * limitations under the License. */ -package org.apache.ignite.client.handler.requests.sql; +package org.apache.ignite.client.handler.requests.jdbc; import java.util.concurrent.CompletableFuture; -import org.apache.ignite.client.proto.query.JdbcQueryEventHandler; -import org.apache.ignite.client.proto.query.event.BatchPreparedStmntRequest; import org.apache.ignite.internal.client.proto.ClientMessagePacker; import org.apache.ignite.internal.client.proto.ClientMessageUnpacker; +import org.apache.ignite.internal.jdbc.proto.JdbcQueryEventHandler; +import org.apache.ignite.internal.jdbc.proto.event.BatchPreparedStmntRequest; /** - * Client prepared statement sql execute request handler. + * Client jdbc prepared statement sql execute request handler. */ -public class ClientSqlPreparedStmntBatchRequest { +public class ClientJdbcPreparedStmntBatchRequest { /** * Processes remote {@code BatchPreparedStmntRequest}. * diff --git a/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/ClientSqlPrimaryKeyMetadataRequest.java b/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/jdbc/ClientJdbcPrimaryKeyMetadataRequest.java similarity index 83% rename from modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/ClientSqlPrimaryKeyMetadataRequest.java rename to modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/jdbc/ClientJdbcPrimaryKeyMetadataRequest.java index 07c94ad26..2824b439e 100644 --- a/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/ClientSqlPrimaryKeyMetadataRequest.java +++ b/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/jdbc/ClientJdbcPrimaryKeyMetadataRequest.java @@ -15,18 +15,18 @@ * limitations under the License. */ -package org.apache.ignite.client.handler.requests.sql; +package org.apache.ignite.client.handler.requests.jdbc; import java.util.concurrent.CompletableFuture; -import org.apache.ignite.client.proto.query.JdbcQueryEventHandler; -import org.apache.ignite.client.proto.query.event.JdbcMetaPrimaryKeysRequest; import org.apache.ignite.internal.client.proto.ClientMessagePacker; import org.apache.ignite.internal.client.proto.ClientMessageUnpacker; +import org.apache.ignite.internal.jdbc.proto.JdbcQueryEventHandler; +import org.apache.ignite.internal.jdbc.proto.event.JdbcMetaPrimaryKeysRequest; /** - * Client sql primary key metadata request handler. + * Client jdbc primary key metadata request handler. */ -public class ClientSqlPrimaryKeyMetadataRequest { +public class ClientJdbcPrimaryKeyMetadataRequest { /** * Processes remote {@code JdbcMetaPrimaryKeysRequest}. * diff --git a/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/ClientSqlQueryMetadataRequest.java b/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/jdbc/ClientJdbcQueryMetadataRequest.java similarity index 84% rename from modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/ClientSqlQueryMetadataRequest.java rename to modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/jdbc/ClientJdbcQueryMetadataRequest.java index 9524097ab..f1843a4e0 100644 --- a/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/ClientSqlQueryMetadataRequest.java +++ b/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/jdbc/ClientJdbcQueryMetadataRequest.java @@ -15,18 +15,18 @@ * limitations under the License. */ -package org.apache.ignite.client.handler.requests.sql; +package org.apache.ignite.client.handler.requests.jdbc; import java.util.concurrent.CompletableFuture; -import org.apache.ignite.client.proto.query.JdbcQueryEventHandler; -import org.apache.ignite.client.proto.query.event.JdbcQueryMetadataRequest; import org.apache.ignite.internal.client.proto.ClientMessagePacker; import org.apache.ignite.internal.client.proto.ClientMessageUnpacker; +import org.apache.ignite.internal.jdbc.proto.JdbcQueryEventHandler; +import org.apache.ignite.internal.jdbc.proto.event.JdbcQueryMetadataRequest; /** - * Client sql query metadata request handler. + * Client jdbc query metadata request handler. */ -public class ClientSqlQueryMetadataRequest { +public class ClientJdbcQueryMetadataRequest { /** * Processes remote {@code JdbcQueryMetadataRequest}. * diff --git a/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/ClientSqlSchemasMetadataRequest.java b/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/jdbc/ClientJdbcSchemasMetadataRequest.java similarity index 84% rename from modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/ClientSqlSchemasMetadataRequest.java rename to modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/jdbc/ClientJdbcSchemasMetadataRequest.java index 3c2390ed9..fbe05893a 100644 --- a/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/ClientSqlSchemasMetadataRequest.java +++ b/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/jdbc/ClientJdbcSchemasMetadataRequest.java @@ -15,18 +15,18 @@ * limitations under the License. */ -package org.apache.ignite.client.handler.requests.sql; +package org.apache.ignite.client.handler.requests.jdbc; import java.util.concurrent.CompletableFuture; -import org.apache.ignite.client.proto.query.JdbcQueryEventHandler; -import org.apache.ignite.client.proto.query.event.JdbcMetaSchemasRequest; import org.apache.ignite.internal.client.proto.ClientMessagePacker; import org.apache.ignite.internal.client.proto.ClientMessageUnpacker; +import org.apache.ignite.internal.jdbc.proto.JdbcQueryEventHandler; +import org.apache.ignite.internal.jdbc.proto.event.JdbcMetaSchemasRequest; /** - * Client sql schema metadata request handler. + * Client jdbc schema metadata request handler. */ -public class ClientSqlSchemasMetadataRequest { +public class ClientJdbcSchemasMetadataRequest { /** * Processes remote {@code JdbcMetaSchemasRequest}. * diff --git a/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/ClientSqlTableMetadataRequest.java b/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/jdbc/ClientJdbcTableMetadataRequest.java similarity index 84% rename from modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/ClientSqlTableMetadataRequest.java rename to modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/jdbc/ClientJdbcTableMetadataRequest.java index 9f7cb4be7..8708ed4aa 100644 --- a/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/ClientSqlTableMetadataRequest.java +++ b/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/jdbc/ClientJdbcTableMetadataRequest.java @@ -15,18 +15,18 @@ * limitations under the License. */ -package org.apache.ignite.client.handler.requests.sql; +package org.apache.ignite.client.handler.requests.jdbc; import java.util.concurrent.CompletableFuture; -import org.apache.ignite.client.proto.query.JdbcQueryEventHandler; -import org.apache.ignite.client.proto.query.event.JdbcMetaTablesRequest; import org.apache.ignite.internal.client.proto.ClientMessagePacker; import org.apache.ignite.internal.client.proto.ClientMessageUnpacker; +import org.apache.ignite.internal.jdbc.proto.JdbcQueryEventHandler; +import org.apache.ignite.internal.jdbc.proto.event.JdbcMetaTablesRequest; /** - * Client sql table metadata request handler. + * Client jdbc table metadata request handler. */ -public class ClientSqlTableMetadataRequest { +public class ClientJdbcTableMetadataRequest { /** * Processes remote {@code JdbcMetaTablesRequest}. * diff --git a/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/JdbcMetadataCatalog.java b/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/jdbc/JdbcMetadataCatalog.java similarity index 97% rename from modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/JdbcMetadataCatalog.java rename to modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/jdbc/JdbcMetadataCatalog.java index fdffb9882..0c3ec3032 100644 --- a/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/JdbcMetadataCatalog.java +++ b/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/jdbc/JdbcMetadataCatalog.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.ignite.client.handler.requests.sql; +package org.apache.ignite.client.handler.requests.jdbc; import java.sql.DatabaseMetaData; import java.util.ArrayList; @@ -29,9 +29,9 @@ import java.util.TreeSet; import java.util.concurrent.CompletableFuture; import java.util.function.Function; import java.util.stream.Collectors; -import org.apache.ignite.client.proto.query.event.JdbcColumnMeta; -import org.apache.ignite.client.proto.query.event.JdbcPrimaryKeyMeta; -import org.apache.ignite.client.proto.query.event.JdbcTableMeta; +import org.apache.ignite.internal.jdbc.proto.event.JdbcColumnMeta; +import org.apache.ignite.internal.jdbc.proto.event.JdbcPrimaryKeyMeta; +import org.apache.ignite.internal.jdbc.proto.event.JdbcTableMeta; import org.apache.ignite.internal.schema.Column; import org.apache.ignite.internal.schema.NativeType; import org.apache.ignite.internal.schema.SchemaDescriptor; diff --git a/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/JdbcQueryCursor.java b/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/jdbc/JdbcQueryCursor.java similarity index 95% rename from modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/JdbcQueryCursor.java rename to modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/jdbc/JdbcQueryCursor.java index 6c52d61f5..8853a2ad3 100644 --- a/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/JdbcQueryCursor.java +++ b/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/jdbc/JdbcQueryCursor.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.ignite.client.handler.requests.sql; +package org.apache.ignite.client.handler.requests.jdbc; import java.util.List; import java.util.concurrent.CompletableFuture; @@ -26,7 +26,7 @@ import org.apache.ignite.internal.sql.engine.ResultSetMetadata; import org.apache.ignite.internal.sql.engine.SqlQueryType; /** - * Sql query cursor with the ability to limit the maximum number of rows returned. + * Jdbc query cursor with the ability to limit the maximum number of rows returned. * * <p>The {@link JdbcQueryCursor#maxRows} parameter limits the amount of rows to be returned by the cursor. * Its value can either be a positive value or equal to zero, where zero means no limit. diff --git a/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/package-info.java b/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/jdbc/package-info.java similarity index 93% rename from modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/package-info.java rename to modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/jdbc/package-info.java index 6989479a7..48f739941 100644 --- a/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/package-info.java +++ b/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/jdbc/package-info.java @@ -19,4 +19,4 @@ * Sql API handler. */ -package org.apache.ignite.client.handler.requests.sql; +package org.apache.ignite.client.handler.requests.jdbc; diff --git a/modules/client/src/main/java/org/apache/ignite/internal/client/ClientUtils.java b/modules/client/src/main/java/org/apache/ignite/internal/client/ClientUtils.java index 3e060381d..69631ca83 100644 --- a/modules/client/src/main/java/org/apache/ignite/internal/client/ClientUtils.java +++ b/modules/client/src/main/java/org/apache/ignite/internal/client/ClientUtils.java @@ -135,31 +135,31 @@ public class ClientUtils { case ClientOp.TUPLE_CONTAINS_KEY: return ClientOperationType.TUPLE_CONTAINS_KEY; - case ClientOp.SQL_EXEC: + case ClientOp.JDBC_EXEC: return null; - case ClientOp.SQL_NEXT: + case ClientOp.JDBC_NEXT: return null; - case ClientOp.SQL_EXEC_BATCH: + case ClientOp.JDBC_EXEC_BATCH: return null; - case ClientOp.SQL_CURSOR_CLOSE: + case ClientOp.JDBC_CURSOR_CLOSE: return null; - case ClientOp.SQL_TABLE_META: + case ClientOp.JDBC_TABLE_META: return null; - case ClientOp.SQL_COLUMN_META: + case ClientOp.JDBC_COLUMN_META: return null; - case ClientOp.SQL_SCHEMAS_META: + case ClientOp.JDBC_SCHEMAS_META: return null; - case ClientOp.SQL_PK_META: + case ClientOp.JDBC_PK_META: return null; - case ClientOp.SQL_QUERY_META: + case ClientOp.JDBC_QUERY_META: return null; case ClientOp.TX_BEGIN: diff --git a/modules/client/src/main/java/org/apache/ignite/internal/client/TcpIgniteClient.java b/modules/client/src/main/java/org/apache/ignite/internal/client/TcpIgniteClient.java index d19f20bb8..e64ae8e69 100644 --- a/modules/client/src/main/java/org/apache/ignite/internal/client/TcpIgniteClient.java +++ b/modules/client/src/main/java/org/apache/ignite/internal/client/TcpIgniteClient.java @@ -28,13 +28,13 @@ import java.util.function.BiFunction; import org.apache.ignite.client.IgniteClient; import org.apache.ignite.client.IgniteClientConfiguration; import org.apache.ignite.client.IgniteClientException; -import org.apache.ignite.client.proto.query.ClientMessage; import org.apache.ignite.compute.IgniteCompute; import org.apache.ignite.internal.client.compute.ClientCompute; import org.apache.ignite.internal.client.io.ClientConnectionMultiplexer; import org.apache.ignite.internal.client.proto.ClientOp; import org.apache.ignite.internal.client.table.ClientTables; import org.apache.ignite.internal.client.tx.ClientTransactions; +import org.apache.ignite.internal.jdbc.proto.ClientMessage; import org.apache.ignite.network.ClusterNode; import org.apache.ignite.network.NetworkAddress; import org.apache.ignite.sql.IgniteSql; diff --git a/modules/client/src/main/java/org/apache/ignite/internal/jdbc/ConnectionPropertiesImpl.java b/modules/client/src/main/java/org/apache/ignite/internal/jdbc/ConnectionPropertiesImpl.java index b39e1e652..a0ceb357f 100644 --- a/modules/client/src/main/java/org/apache/ignite/internal/jdbc/ConnectionPropertiesImpl.java +++ b/modules/client/src/main/java/org/apache/ignite/internal/jdbc/ConnectionPropertiesImpl.java @@ -24,8 +24,8 @@ import java.util.Arrays; import java.util.Properties; import java.util.StringTokenizer; import org.apache.ignite.client.IgniteClientConfiguration; -import org.apache.ignite.client.proto.query.SqlStateCode; import org.apache.ignite.internal.client.HostAndPortRange; +import org.apache.ignite.internal.jdbc.proto.SqlStateCode; import org.apache.ignite.internal.util.ArrayUtils; import org.apache.ignite.lang.IgniteException; import org.jetbrains.annotations.Nullable; diff --git a/modules/client/src/main/java/org/apache/ignite/internal/client/query/JdbcClientQueryEventHandler.java b/modules/client/src/main/java/org/apache/ignite/internal/jdbc/JdbcClientQueryEventHandler.java similarity index 63% rename from modules/client/src/main/java/org/apache/ignite/internal/client/query/JdbcClientQueryEventHandler.java rename to modules/client/src/main/java/org/apache/ignite/internal/jdbc/JdbcClientQueryEventHandler.java index edf7f0385..6fb1bf1ae 100644 --- a/modules/client/src/main/java/org/apache/ignite/internal/client/query/JdbcClientQueryEventHandler.java +++ b/modules/client/src/main/java/org/apache/ignite/internal/jdbc/JdbcClientQueryEventHandler.java @@ -15,30 +15,30 @@ * limitations under the License. */ -package org.apache.ignite.internal.client.query; +package org.apache.ignite.internal.jdbc; import java.util.concurrent.CompletableFuture; -import org.apache.ignite.client.proto.query.JdbcQueryEventHandler; -import org.apache.ignite.client.proto.query.event.BatchExecuteRequest; -import org.apache.ignite.client.proto.query.event.BatchExecuteResult; -import org.apache.ignite.client.proto.query.event.BatchPreparedStmntRequest; -import org.apache.ignite.client.proto.query.event.JdbcMetaColumnsRequest; -import org.apache.ignite.client.proto.query.event.JdbcMetaColumnsResult; -import org.apache.ignite.client.proto.query.event.JdbcMetaPrimaryKeysRequest; -import org.apache.ignite.client.proto.query.event.JdbcMetaPrimaryKeysResult; -import org.apache.ignite.client.proto.query.event.JdbcMetaSchemasRequest; -import org.apache.ignite.client.proto.query.event.JdbcMetaSchemasResult; -import org.apache.ignite.client.proto.query.event.JdbcMetaTablesRequest; -import org.apache.ignite.client.proto.query.event.JdbcMetaTablesResult; -import org.apache.ignite.client.proto.query.event.JdbcQueryMetadataRequest; -import org.apache.ignite.client.proto.query.event.QueryCloseRequest; -import org.apache.ignite.client.proto.query.event.QueryCloseResult; -import org.apache.ignite.client.proto.query.event.QueryExecuteRequest; -import org.apache.ignite.client.proto.query.event.QueryExecuteResult; -import org.apache.ignite.client.proto.query.event.QueryFetchRequest; -import org.apache.ignite.client.proto.query.event.QueryFetchResult; import org.apache.ignite.internal.client.TcpIgniteClient; import org.apache.ignite.internal.client.proto.ClientOp; +import org.apache.ignite.internal.jdbc.proto.JdbcQueryEventHandler; +import org.apache.ignite.internal.jdbc.proto.event.BatchExecuteRequest; +import org.apache.ignite.internal.jdbc.proto.event.BatchExecuteResult; +import org.apache.ignite.internal.jdbc.proto.event.BatchPreparedStmntRequest; +import org.apache.ignite.internal.jdbc.proto.event.JdbcMetaColumnsRequest; +import org.apache.ignite.internal.jdbc.proto.event.JdbcMetaColumnsResult; +import org.apache.ignite.internal.jdbc.proto.event.JdbcMetaPrimaryKeysRequest; +import org.apache.ignite.internal.jdbc.proto.event.JdbcMetaPrimaryKeysResult; +import org.apache.ignite.internal.jdbc.proto.event.JdbcMetaSchemasRequest; +import org.apache.ignite.internal.jdbc.proto.event.JdbcMetaSchemasResult; +import org.apache.ignite.internal.jdbc.proto.event.JdbcMetaTablesRequest; +import org.apache.ignite.internal.jdbc.proto.event.JdbcMetaTablesResult; +import org.apache.ignite.internal.jdbc.proto.event.JdbcQueryMetadataRequest; +import org.apache.ignite.internal.jdbc.proto.event.QueryCloseRequest; +import org.apache.ignite.internal.jdbc.proto.event.QueryCloseResult; +import org.apache.ignite.internal.jdbc.proto.event.QueryExecuteRequest; +import org.apache.ignite.internal.jdbc.proto.event.QueryExecuteResult; +import org.apache.ignite.internal.jdbc.proto.event.QueryFetchRequest; +import org.apache.ignite.internal.jdbc.proto.event.QueryFetchResult; /** * Jdbc query network event handler implementation. @@ -61,7 +61,7 @@ public class JdbcClientQueryEventHandler implements JdbcQueryEventHandler { public CompletableFuture<QueryExecuteResult> queryAsync(QueryExecuteRequest req) { QueryExecuteResult res = new QueryExecuteResult(); - return client.sendRequestAsync(ClientOp.SQL_EXEC, req, res); + return client.sendRequestAsync(ClientOp.JDBC_EXEC, req, res); } /** {@inheritDoc} */ @@ -69,7 +69,7 @@ public class JdbcClientQueryEventHandler implements JdbcQueryEventHandler { public CompletableFuture<QueryFetchResult> fetchAsync(QueryFetchRequest req) { QueryFetchResult res = new QueryFetchResult(); - return client.sendRequestAsync(ClientOp.SQL_NEXT, req, res); + return client.sendRequestAsync(ClientOp.JDBC_NEXT, req, res); } /** {@inheritDoc} */ @@ -77,7 +77,7 @@ public class JdbcClientQueryEventHandler implements JdbcQueryEventHandler { public CompletableFuture<BatchExecuteResult> batchAsync(BatchExecuteRequest req) { BatchExecuteResult res = new BatchExecuteResult(); - return client.sendRequestAsync(ClientOp.SQL_EXEC_BATCH, req, res); + return client.sendRequestAsync(ClientOp.JDBC_EXEC_BATCH, req, res); } /** {@inheritDoc} */ @@ -95,7 +95,7 @@ public class JdbcClientQueryEventHandler implements JdbcQueryEventHandler { public CompletableFuture<QueryCloseResult> closeAsync(QueryCloseRequest req) { QueryCloseResult res = new QueryCloseResult(); - return client.sendRequestAsync(ClientOp.SQL_CURSOR_CLOSE, req, res); + return client.sendRequestAsync(ClientOp.JDBC_CURSOR_CLOSE, req, res); } /** {@inheritDoc} */ @@ -103,7 +103,7 @@ public class JdbcClientQueryEventHandler implements JdbcQueryEventHandler { public CompletableFuture<JdbcMetaTablesResult> tablesMetaAsync(JdbcMetaTablesRequest req) { JdbcMetaTablesResult res = new JdbcMetaTablesResult(); - return client.sendRequestAsync(ClientOp.SQL_TABLE_META, req, res); + return client.sendRequestAsync(ClientOp.JDBC_TABLE_META, req, res); } /** {@inheritDoc} */ @@ -111,7 +111,7 @@ public class JdbcClientQueryEventHandler implements JdbcQueryEventHandler { public CompletableFuture<JdbcMetaColumnsResult> columnsMetaAsync(JdbcMetaColumnsRequest req) { JdbcMetaColumnsResult res = new JdbcMetaColumnsResult(); - return client.sendRequestAsync(ClientOp.SQL_COLUMN_META, req, res); + return client.sendRequestAsync(ClientOp.JDBC_COLUMN_META, req, res); } /** {@inheritDoc} */ @@ -119,7 +119,7 @@ public class JdbcClientQueryEventHandler implements JdbcQueryEventHandler { public CompletableFuture<JdbcMetaSchemasResult> schemasMetaAsync(JdbcMetaSchemasRequest req) { JdbcMetaSchemasResult res = new JdbcMetaSchemasResult(); - return client.sendRequestAsync(ClientOp.SQL_SCHEMAS_META, req, res); + return client.sendRequestAsync(ClientOp.JDBC_SCHEMAS_META, req, res); } /** {@inheritDoc} */ @@ -127,7 +127,7 @@ public class JdbcClientQueryEventHandler implements JdbcQueryEventHandler { public CompletableFuture<JdbcMetaPrimaryKeysResult> primaryKeysMetaAsync(JdbcMetaPrimaryKeysRequest req) { JdbcMetaPrimaryKeysResult res = new JdbcMetaPrimaryKeysResult(); - return client.sendRequestAsync(ClientOp.SQL_PK_META, req, res); + return client.sendRequestAsync(ClientOp.JDBC_PK_META, req, res); } /** {@inheritDoc} */ @@ -135,6 +135,6 @@ public class JdbcClientQueryEventHandler implements JdbcQueryEventHandler { public CompletableFuture<JdbcMetaColumnsResult> queryMetadataAsync(JdbcQueryMetadataRequest req) { JdbcMetaColumnsResult res = new JdbcMetaColumnsResult(); - return client.sendRequestAsync(ClientOp.SQL_QUERY_META, req, res); + return client.sendRequestAsync(ClientOp.JDBC_QUERY_META, req, res); } } diff --git a/modules/client/src/main/java/org/apache/ignite/internal/jdbc/JdbcConnection.java b/modules/client/src/main/java/org/apache/ignite/internal/jdbc/JdbcConnection.java index 634a23d80..28ce90862 100644 --- a/modules/client/src/main/java/org/apache/ignite/internal/jdbc/JdbcConnection.java +++ b/modules/client/src/main/java/org/apache/ignite/internal/jdbc/JdbcConnection.java @@ -21,8 +21,8 @@ import static java.sql.ResultSet.CLOSE_CURSORS_AT_COMMIT; import static java.sql.ResultSet.CONCUR_READ_ONLY; import static java.sql.ResultSet.HOLD_CURSORS_OVER_COMMIT; import static java.sql.ResultSet.TYPE_FORWARD_ONLY; -import static org.apache.ignite.client.proto.query.SqlStateCode.CLIENT_CONNECTION_FAILED; -import static org.apache.ignite.client.proto.query.SqlStateCode.CONNECTION_CLOSED; +import static org.apache.ignite.internal.jdbc.proto.SqlStateCode.CLIENT_CONNECTION_FAILED; +import static org.apache.ignite.internal.jdbc.proto.SqlStateCode.CONNECTION_CLOSED; import java.sql.Array; import java.sql.Blob; @@ -51,11 +51,10 @@ import java.util.Properties; import java.util.Set; import java.util.concurrent.Executor; import org.apache.ignite.client.IgniteClient; -import org.apache.ignite.client.proto.query.JdbcQueryEventHandler; -import org.apache.ignite.client.proto.query.SqlStateCode; import org.apache.ignite.internal.client.HostAndPortRange; import org.apache.ignite.internal.client.TcpIgniteClient; -import org.apache.ignite.internal.client.query.JdbcClientQueryEventHandler; +import org.apache.ignite.internal.jdbc.proto.JdbcQueryEventHandler; +import org.apache.ignite.internal.jdbc.proto.SqlStateCode; import org.apache.ignite.schema.definition.TableDefinition; import org.jetbrains.annotations.Nullable; diff --git a/modules/client/src/main/java/org/apache/ignite/internal/jdbc/JdbcDatabaseMetadata.java b/modules/client/src/main/java/org/apache/ignite/internal/jdbc/JdbcDatabaseMetadata.java index b0ea55527..5b73b709c 100644 --- a/modules/client/src/main/java/org/apache/ignite/internal/jdbc/JdbcDatabaseMetadata.java +++ b/modules/client/src/main/java/org/apache/ignite/internal/jdbc/JdbcDatabaseMetadata.java @@ -36,19 +36,19 @@ import java.util.Arrays; import java.util.Collections; import java.util.LinkedList; import java.util.List; -import org.apache.ignite.client.proto.query.IgniteQueryErrorCode; -import org.apache.ignite.client.proto.query.event.JdbcColumnMeta; -import org.apache.ignite.client.proto.query.event.JdbcMetaColumnsRequest; -import org.apache.ignite.client.proto.query.event.JdbcMetaColumnsResult; -import org.apache.ignite.client.proto.query.event.JdbcMetaPrimaryKeysRequest; -import org.apache.ignite.client.proto.query.event.JdbcMetaPrimaryKeysResult; -import org.apache.ignite.client.proto.query.event.JdbcMetaSchemasRequest; -import org.apache.ignite.client.proto.query.event.JdbcMetaSchemasResult; -import org.apache.ignite.client.proto.query.event.JdbcMetaTablesRequest; -import org.apache.ignite.client.proto.query.event.JdbcMetaTablesResult; -import org.apache.ignite.client.proto.query.event.JdbcPrimaryKeyMeta; -import org.apache.ignite.client.proto.query.event.JdbcTableMeta; import org.apache.ignite.internal.client.proto.ProtocolVersion; +import org.apache.ignite.internal.jdbc.proto.IgniteQueryErrorCode; +import org.apache.ignite.internal.jdbc.proto.event.JdbcColumnMeta; +import org.apache.ignite.internal.jdbc.proto.event.JdbcMetaColumnsRequest; +import org.apache.ignite.internal.jdbc.proto.event.JdbcMetaColumnsResult; +import org.apache.ignite.internal.jdbc.proto.event.JdbcMetaPrimaryKeysRequest; +import org.apache.ignite.internal.jdbc.proto.event.JdbcMetaPrimaryKeysResult; +import org.apache.ignite.internal.jdbc.proto.event.JdbcMetaSchemasRequest; +import org.apache.ignite.internal.jdbc.proto.event.JdbcMetaSchemasResult; +import org.apache.ignite.internal.jdbc.proto.event.JdbcMetaTablesRequest; +import org.apache.ignite.internal.jdbc.proto.event.JdbcMetaTablesResult; +import org.apache.ignite.internal.jdbc.proto.event.JdbcPrimaryKeyMeta; +import org.apache.ignite.internal.jdbc.proto.event.JdbcTableMeta; /** * JDBC database metadata implementation. diff --git a/modules/client/src/main/java/org/apache/ignite/internal/jdbc/JdbcPreparedStatement.java b/modules/client/src/main/java/org/apache/ignite/internal/jdbc/JdbcPreparedStatement.java index eb1f59456..ad9ddd961 100644 --- a/modules/client/src/main/java/org/apache/ignite/internal/jdbc/JdbcPreparedStatement.java +++ b/modules/client/src/main/java/org/apache/ignite/internal/jdbc/JdbcPreparedStatement.java @@ -45,11 +45,11 @@ import java.util.ArrayList; import java.util.Calendar; import java.util.List; import java.util.Objects; -import org.apache.ignite.client.proto.query.IgniteQueryErrorCode; -import org.apache.ignite.client.proto.query.JdbcStatementType; -import org.apache.ignite.client.proto.query.SqlStateCode; -import org.apache.ignite.client.proto.query.event.BatchExecuteResult; -import org.apache.ignite.client.proto.query.event.BatchPreparedStmntRequest; +import org.apache.ignite.internal.jdbc.proto.IgniteQueryErrorCode; +import org.apache.ignite.internal.jdbc.proto.JdbcStatementType; +import org.apache.ignite.internal.jdbc.proto.SqlStateCode; +import org.apache.ignite.internal.jdbc.proto.event.BatchExecuteResult; +import org.apache.ignite.internal.jdbc.proto.event.BatchPreparedStmntRequest; import org.apache.ignite.internal.util.CollectionUtils; /** diff --git a/modules/client/src/main/java/org/apache/ignite/internal/jdbc/JdbcResultSet.java b/modules/client/src/main/java/org/apache/ignite/internal/jdbc/JdbcResultSet.java index 77b5710d8..89ffb69ff 100644 --- a/modules/client/src/main/java/org/apache/ignite/internal/jdbc/JdbcResultSet.java +++ b/modules/client/src/main/java/org/apache/ignite/internal/jdbc/JdbcResultSet.java @@ -56,16 +56,16 @@ import java.util.List; import java.util.Map; import java.util.Objects; import java.util.UUID; -import org.apache.ignite.client.proto.query.IgniteQueryErrorCode; -import org.apache.ignite.client.proto.query.JdbcQueryEventHandler; -import org.apache.ignite.client.proto.query.SqlStateCode; -import org.apache.ignite.client.proto.query.event.JdbcColumnMeta; -import org.apache.ignite.client.proto.query.event.JdbcMetaColumnsResult; -import org.apache.ignite.client.proto.query.event.JdbcQueryMetadataRequest; -import org.apache.ignite.client.proto.query.event.QueryCloseRequest; -import org.apache.ignite.client.proto.query.event.QueryCloseResult; -import org.apache.ignite.client.proto.query.event.QueryFetchRequest; -import org.apache.ignite.client.proto.query.event.QueryFetchResult; +import org.apache.ignite.internal.jdbc.proto.IgniteQueryErrorCode; +import org.apache.ignite.internal.jdbc.proto.JdbcQueryEventHandler; +import org.apache.ignite.internal.jdbc.proto.SqlStateCode; +import org.apache.ignite.internal.jdbc.proto.event.JdbcColumnMeta; +import org.apache.ignite.internal.jdbc.proto.event.JdbcMetaColumnsResult; +import org.apache.ignite.internal.jdbc.proto.event.JdbcQueryMetadataRequest; +import org.apache.ignite.internal.jdbc.proto.event.QueryCloseRequest; +import org.apache.ignite.internal.jdbc.proto.event.QueryCloseResult; +import org.apache.ignite.internal.jdbc.proto.event.QueryFetchRequest; +import org.apache.ignite.internal.jdbc.proto.event.QueryFetchResult; /** * Jdbc result set implementation. diff --git a/modules/client/src/main/java/org/apache/ignite/internal/jdbc/JdbcResultSetMetadata.java b/modules/client/src/main/java/org/apache/ignite/internal/jdbc/JdbcResultSetMetadata.java index afd8ee9af..de1a36b51 100644 --- a/modules/client/src/main/java/org/apache/ignite/internal/jdbc/JdbcResultSetMetadata.java +++ b/modules/client/src/main/java/org/apache/ignite/internal/jdbc/JdbcResultSetMetadata.java @@ -20,7 +20,7 @@ package org.apache.ignite.internal.jdbc; import java.sql.ResultSetMetaData; import java.sql.SQLException; import java.util.List; -import org.apache.ignite.client.proto.query.event.JdbcColumnMeta; +import org.apache.ignite.internal.jdbc.proto.event.JdbcColumnMeta; /** * JDBC result set metadata implementation. @@ -184,4 +184,4 @@ public class JdbcResultSetMetadata implements ResultSetMetaData { public boolean isWrapperFor(Class<?> iface) throws SQLException { return iface != null && iface.isAssignableFrom(JdbcResultSetMetadata.class); } -} \ No newline at end of file +} diff --git a/modules/client/src/main/java/org/apache/ignite/internal/jdbc/JdbcStatement.java b/modules/client/src/main/java/org/apache/ignite/internal/jdbc/JdbcStatement.java index 23a6aac1c..fe99c0b56 100644 --- a/modules/client/src/main/java/org/apache/ignite/internal/jdbc/JdbcStatement.java +++ b/modules/client/src/main/java/org/apache/ignite/internal/jdbc/JdbcStatement.java @@ -32,14 +32,14 @@ import java.sql.Statement; import java.util.ArrayList; import java.util.List; import java.util.Objects; -import org.apache.ignite.client.proto.query.IgniteQueryErrorCode; -import org.apache.ignite.client.proto.query.JdbcStatementType; -import org.apache.ignite.client.proto.query.SqlStateCode; -import org.apache.ignite.client.proto.query.event.BatchExecuteRequest; -import org.apache.ignite.client.proto.query.event.BatchExecuteResult; -import org.apache.ignite.client.proto.query.event.QueryExecuteRequest; -import org.apache.ignite.client.proto.query.event.QueryExecuteResult; -import org.apache.ignite.client.proto.query.event.QuerySingleResult; +import org.apache.ignite.internal.jdbc.proto.IgniteQueryErrorCode; +import org.apache.ignite.internal.jdbc.proto.JdbcStatementType; +import org.apache.ignite.internal.jdbc.proto.SqlStateCode; +import org.apache.ignite.internal.jdbc.proto.event.BatchExecuteRequest; +import org.apache.ignite.internal.jdbc.proto.event.BatchExecuteResult; +import org.apache.ignite.internal.jdbc.proto.event.QueryExecuteRequest; +import org.apache.ignite.internal.jdbc.proto.event.QueryExecuteResult; +import org.apache.ignite.internal.jdbc.proto.event.QuerySingleResult; import org.apache.ignite.internal.util.ArrayUtils; import org.apache.ignite.internal.util.CollectionUtils; diff --git a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/jdbc/ItJdbcBatchSelfTest.java b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/jdbc/ItJdbcBatchSelfTest.java index b20634203..0e56acffa 100644 --- a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/jdbc/ItJdbcBatchSelfTest.java +++ b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/jdbc/ItJdbcBatchSelfTest.java @@ -31,8 +31,8 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.Arrays; -import org.apache.ignite.client.proto.query.IgniteQueryErrorCode; -import org.apache.ignite.client.proto.query.SqlStateCode; +import org.apache.ignite.internal.jdbc.proto.IgniteQueryErrorCode; +import org.apache.ignite.internal.jdbc.proto.SqlStateCode; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeAll; diff --git a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/jdbc/ItJdbcConnectionSelfTest.java b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/jdbc/ItJdbcConnectionSelfTest.java index a26de2b78..93aeb8462 100644 --- a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/jdbc/ItJdbcConnectionSelfTest.java +++ b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/jdbc/ItJdbcConnectionSelfTest.java @@ -28,7 +28,7 @@ import static java.sql.ResultSet.HOLD_CURSORS_OVER_COMMIT; import static java.sql.ResultSet.TYPE_FORWARD_ONLY; import static java.sql.Statement.NO_GENERATED_KEYS; import static java.sql.Statement.RETURN_GENERATED_KEYS; -import static org.apache.ignite.client.proto.query.SqlStateCode.TRANSACTION_STATE_EXCEPTION; +import static org.apache.ignite.internal.jdbc.proto.SqlStateCode.TRANSACTION_STATE_EXCEPTION; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; diff --git a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/jdbc/ItJdbcErrorsAbstractSelfTest.java b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/jdbc/ItJdbcErrorsAbstractSelfTest.java index 622811e62..c175d22b1 100644 --- a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/jdbc/ItJdbcErrorsAbstractSelfTest.java +++ b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/jdbc/ItJdbcErrorsAbstractSelfTest.java @@ -17,12 +17,12 @@ package org.apache.ignite.internal.runner.app.jdbc; -import static org.apache.ignite.client.proto.query.SqlStateCode.CONNECTION_CLOSED; -import static org.apache.ignite.client.proto.query.SqlStateCode.CONVERSION_FAILED; -import static org.apache.ignite.client.proto.query.SqlStateCode.INVALID_CURSOR_STATE; -import static org.apache.ignite.client.proto.query.SqlStateCode.NULL_VALUE; -import static org.apache.ignite.client.proto.query.SqlStateCode.PARSING_EXCEPTION; -import static org.apache.ignite.client.proto.query.SqlStateCode.UNSUPPORTED_OPERATION; +import static org.apache.ignite.internal.jdbc.proto.SqlStateCode.CONNECTION_CLOSED; +import static org.apache.ignite.internal.jdbc.proto.SqlStateCode.CONVERSION_FAILED; +import static org.apache.ignite.internal.jdbc.proto.SqlStateCode.INVALID_CURSOR_STATE; +import static org.apache.ignite.internal.jdbc.proto.SqlStateCode.NULL_VALUE; +import static org.apache.ignite.internal.jdbc.proto.SqlStateCode.PARSING_EXCEPTION; +import static org.apache.ignite.internal.jdbc.proto.SqlStateCode.UNSUPPORTED_OPERATION; import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -628,4 +628,4 @@ public abstract class ItJdbcErrorsAbstractSelfTest extends AbstractJdbcSelfTest */ void run() throws SQLException; } -} \ No newline at end of file +} diff --git a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/jdbc/ItJdbcErrorsSelfTest.java b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/jdbc/ItJdbcErrorsSelfTest.java index 9a853c27c..efc48437d 100644 --- a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/jdbc/ItJdbcErrorsSelfTest.java +++ b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/jdbc/ItJdbcErrorsSelfTest.java @@ -17,9 +17,9 @@ package org.apache.ignite.internal.runner.app.jdbc; -import static org.apache.ignite.client.proto.query.SqlStateCode.CLIENT_CONNECTION_FAILED; -import static org.apache.ignite.client.proto.query.SqlStateCode.INVALID_TRANSACTION_LEVEL; -import static org.apache.ignite.client.proto.query.SqlStateCode.UNSUPPORTED_OPERATION; +import static org.apache.ignite.internal.jdbc.proto.SqlStateCode.CLIENT_CONNECTION_FAILED; +import static org.apache.ignite.internal.jdbc.proto.SqlStateCode.INVALID_TRANSACTION_LEVEL; +import static org.apache.ignite.internal.jdbc.proto.SqlStateCode.UNSUPPORTED_OPERATION; import static org.junit.jupiter.api.Assertions.assertArrayEquals; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue;