diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinPreparedStatementSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinPreparedStatementSelfTest.java index 7982980491d6a1..d9fe8359519b2f 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinPreparedStatementSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinPreparedStatementSelfTest.java @@ -17,7 +17,7 @@ package org.apache.ignite.jdbc.thin; -import java.io.InputStream; +import java.io.ByteArrayInputStream; import java.io.Reader; import java.io.Serializable; import java.math.BigDecimal; @@ -36,6 +36,7 @@ import java.sql.Types; import java.util.Arrays; import java.util.Date; +import java.util.Random; import java.util.concurrent.Callable; import java.util.stream.Collectors; import org.apache.ignite.IgniteCache; @@ -886,6 +887,53 @@ public void testBlob() throws Exception { assertFalse(rs.next()); } + /** + * @throws Exception If failed. + */ + @Test + public void testBlobInputStream() throws Exception { + final int BLOB_SIZE = 123000; + + byte[] bytes = new byte[BLOB_SIZE]; + new Random().nextBytes(bytes); + + try { + try (PreparedStatement stmt = conn.prepareStatement("insert into TestObject(_key, id, blobVal) values (?, ?, ?)")) { + ByteArrayInputStream stream1 = new ByteArrayInputStream(bytes); + + stmt.setInt(1, 3); + stmt.setInt(2, 3); + stmt.setBlob(3, stream1, BLOB_SIZE); + int inserted = stmt.executeUpdate(); + + assertEquals(1, inserted); + } + + try (PreparedStatement stmt = conn.prepareStatement(SQL_PART + " where blobVal is not distinct from ?")) { + ByteArrayInputStream stream2 = new ByteArrayInputStream(bytes); + + stmt.setBlob(1, stream2); + + ResultSet rs = stmt.executeQuery(); + + int cnt = 0; + + while (rs.next()) { + if (cnt == 0) + assert rs.getInt("id") == 3; + + cnt++; + } + + assertEquals(1, cnt); + } + + } + finally { + grid(0).cache(DEFAULT_CACHE_NAME).remove(3); + } + } + /** * @throws Exception If failed. */ @@ -1089,36 +1137,6 @@ public void testNotSupportedTypes() throws Exception { } }); - checkNotSupported(new RunnableX() { - @Override public void runx() throws Exception { - stmt.setBinaryStream(1, null); - } - }); - - checkNotSupported(new RunnableX() { - @Override public void runx() throws Exception { - stmt.setBinaryStream(1, null, 0); - } - }); - - checkNotSupported(new RunnableX() { - @Override public void runx() throws Exception { - stmt.setBinaryStream(1, null, 0L); - } - }); - - checkNotSupported(new RunnableX() { - @Override public void runx() throws Exception { - stmt.setBlob(1, (InputStream)null); - } - }); - - checkNotSupported(new RunnableX() { - @Override public void runx() throws Exception { - stmt.setBlob(1, null, 0L); - } - }); - checkNotSupported(new RunnableX() { @Override public void runx() throws Exception { stmt.setCharacterStream(1, null); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinPartitionAwarenessMappingGroup.java b/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinPartitionAwarenessMappingGroup.java index fcb871a23a0613..118310cc25b8d2 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinPartitionAwarenessMappingGroup.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinPartitionAwarenessMappingGroup.java @@ -25,7 +25,7 @@ import java.util.UUID; import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.processors.odbc.jdbc.JdbcProtocolContext; import org.apache.ignite.internal.processors.odbc.jdbc.JdbcRawBinarylizable; import org.jetbrains.annotations.NotNull; @@ -110,7 +110,7 @@ public Set cacheIds() { /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) throws BinaryObjectException { diff --git a/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinPreparedStatement.java b/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinPreparedStatement.java index d64aaab423e67c..d4f673fd005411 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinPreparedStatement.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinPreparedStatement.java @@ -39,6 +39,7 @@ import java.sql.Timestamp; import java.util.ArrayList; import java.util.Calendar; +import org.apache.ignite.internal.processors.odbc.SqlInputStreamWrapper; import org.apache.ignite.internal.processors.odbc.SqlListenerUtils; import org.apache.ignite.internal.processors.odbc.SqlStateCode; import org.apache.ignite.internal.processors.odbc.jdbc.JdbcMetaParamsRequest; @@ -59,6 +60,15 @@ public class JdbcThinPreparedStatement extends JdbcThinStatement implements Prep /** Parameters metadata. */ private JdbcThinParameterMetadata metaData; + /** + * The maximum size of array to allocate. + * Some VMs reserve some header words in an array. + * Attempts to allocate larger arrays may result in + * OutOfMemoryError: Requested array size exceeds VM limit + * @see java.util.ArrayList#MAX_ARRAY_SIZE + */ + private static final int MAX_ARRAY_SIZE = Integer.MAX_VALUE - 8; + /** * Creates new prepared statement. * @@ -215,7 +225,10 @@ public class JdbcThinPreparedStatement extends JdbcThinStatement implements Prep @Override public void setBinaryStream(int paramIdx, InputStream x, int length) throws SQLException { ensureNotClosed(); - throw new SQLFeatureNotSupportedException("Streams are not supported."); + if (length < 0) + throw new SQLException("Invalid argument. Length should be greater than 0."); + + setArgument(paramIdx, new SqlInputStreamWrapper(x, length)); } /** {@inheritDoc} */ @@ -411,9 +424,7 @@ private void executeWithArguments(JdbcStatementType stmtType) throws SQLExceptio /** {@inheritDoc} */ @Override public void setBlob(int paramIdx, InputStream inputStream, long length) throws SQLException { - ensureNotClosed(); - - throw new SQLFeatureNotSupportedException("SQL-specific types are not supported."); + setBinaryStream(paramIdx, inputStream, length); } /** {@inheritDoc} */ @@ -446,7 +457,10 @@ private void executeWithArguments(JdbcStatementType stmtType) throws SQLExceptio @Override public void setBinaryStream(int paramIdx, InputStream x, long length) throws SQLException { ensureNotClosed(); - throw new SQLFeatureNotSupportedException("Streams are not supported."); + if (length > MAX_ARRAY_SIZE) + throw new SQLFeatureNotSupportedException("Invalid argument. InputStreams with length > " + length + " are not supported."); + + setBinaryStream(paramIdx, x, Math.toIntExact(length)); } /** {@inheritDoc} */ @@ -467,7 +481,7 @@ private void executeWithArguments(JdbcStatementType stmtType) throws SQLExceptio @Override public void setBinaryStream(int paramIdx, InputStream x) throws SQLException { ensureNotClosed(); - throw new SQLFeatureNotSupportedException("Streams are not supported."); + setArgument(paramIdx, new SqlInputStreamWrapper(x)); } /** {@inheritDoc} */ @@ -493,9 +507,7 @@ private void executeWithArguments(JdbcStatementType stmtType) throws SQLExceptio /** {@inheritDoc} */ @Override public void setBlob(int paramIdx, InputStream inputStream) throws SQLException { - ensureNotClosed(); - - throw new SQLFeatureNotSupportedException("SQL-specific types are not supported."); + setBinaryStream(paramIdx, inputStream); } /** {@inheritDoc} */ @@ -518,6 +530,19 @@ private void executeWithArguments(JdbcStatementType stmtType) throws SQLExceptio return iface != null && iface.isAssignableFrom(JdbcThinPreparedStatement.class); } + /** {@inheritDoc} */ + @Override public void closeImpl() { + try { + for (Object arg : args) { + if (arg instanceof AutoCloseable) + ((AutoCloseable)arg).close(); + } + } + catch (Exception ignored) { + // No-op. + } + } + /** * Sets query argument value. * @@ -528,7 +553,7 @@ private void executeWithArguments(JdbcStatementType stmtType) throws SQLExceptio private void setArgument(int paramIdx, Object val) throws SQLException { ensureNotClosed(); - if (val != null && !SqlListenerUtils.isPlainType(val.getClass())) + if (val != null && !SqlListenerUtils.isPlainType(val.getClass()) && !(val instanceof SqlInputStreamWrapper)) ensureCustomObjectsSupported(); if (paramIdx < 1) diff --git a/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinStatement.java b/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinStatement.java index 13ae9b596d6648..b4f3c63d124213 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinStatement.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinStatement.java @@ -399,12 +399,22 @@ private JdbcResult sendFile(JdbcBulkLoadAckResult cmdRes, JdbcThinTcpIo stickyIO closeResults(); conn.closeStatement(this); + + closeImpl(); } finally { closed = true; } } + /** + * This is guaranteed to be called exactly once even in case of concurrent {@link #close()} calls. + * @throws SQLException in case of error + */ + protected void closeImpl() throws SQLException { + // No-op. + } + /** * Close results. * @throws SQLException On error. diff --git a/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinTcpIo.java b/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinTcpIo.java index c7762fa63b207b..aff7681afaa377 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinTcpIo.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinTcpIo.java @@ -50,6 +50,7 @@ import org.apache.ignite.internal.processors.odbc.ClientListenerNioListener; import org.apache.ignite.internal.processors.odbc.ClientListenerProtocolVersion; import org.apache.ignite.internal.processors.odbc.ClientListenerRequest; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.processors.odbc.SqlStateCode; import org.apache.ignite.internal.processors.odbc.jdbc.JdbcBatchExecuteRequest; import org.apache.ignite.internal.processors.odbc.jdbc.JdbcProtocolContext; @@ -561,7 +562,7 @@ else if (req instanceof JdbcQueryFetchRequest) private void sendRequestRaw(JdbcRequest req) throws IOException { int cap = guessCapacity(req); - BinaryWriterExImpl writer = new BinaryWriterExImpl(ctx, new BinaryHeapOutputStream(cap), + SqlBinaryWriter writer = new SqlBinaryWriter(ctx, new BinaryHeapOutputStream(cap), BinaryThreadLocalContext.get().schemaHolder(), null); req.writeBinary(writer, protoCtx); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcBlob.java b/modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcBlob.java index ef2b6b5bd3abc5..6e58788bd5f03f 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcBlob.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcBlob.java @@ -18,6 +18,7 @@ package org.apache.ignite.internal.jdbc2; import java.io.ByteArrayInputStream; +import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.sql.Blob; @@ -36,6 +37,9 @@ public class JdbcBlob implements Blob { /** Byte array. */ private byte[] arr; + /** Output stream. */ + private OutputStream stream; + /** * @param arr Byte array. */ @@ -187,4 +191,38 @@ private void ensureNotClosed() throws SQLException { if (arr == null) throw new SQLException("Blob instance can't be used after free() has been called."); } + + /** + * + */ + private static class BlobOutputStream extends OutputStream { + /** */ + private byte[] arr; + + /** */ + private int idx; + + /** */ + private int len; + + /** + * @param arr Array. + * @param len Length. + */ + public BlobOutputStream(byte[] arr, int len) { + this.arr = arr; + this.len = len; + } + + /** {@inheritDoc} */ + @Override public void write(int b) throws IOException { + if (idx < len) + arr[idx++] = (byte)b; + } + + /** {@inheritDoc} */ + @Override public void write(byte b[], int off, int len) { + + } + } } diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/SqlBinaryWriter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/SqlBinaryWriter.java new file mode 100644 index 00000000000000..45506275309ed2 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/SqlBinaryWriter.java @@ -0,0 +1,74 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.odbc; + +import java.io.IOException; +import java.io.InputStream; +import org.apache.ignite.internal.binary.BinaryContext; +import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.binary.BinaryWriterHandles; +import org.apache.ignite.internal.binary.BinaryWriterSchemaHolder; +import org.apache.ignite.internal.binary.GridBinaryMarshaller; +import org.apache.ignite.internal.binary.streams.BinaryOutputStream; + +/** + * Binary writer for SQL. + */ +public class SqlBinaryWriter extends BinaryWriterExImpl { + /** Default buffer size. */ + public static final int DEFAULT_BUFFER_SIZE = 8192; + + /** */ + public SqlBinaryWriter(BinaryContext ctx, BinaryOutputStream out, BinaryWriterSchemaHolder schema, BinaryWriterHandles handles) { + super(ctx, out, schema, handles); + } + + /** + * Write byte array from the inputStream. + * @param inputStreamWrapper inputStreamWrapper + */ + public void writeInputStreamAsByteArray(SqlInputStreamWrapper inputStreamWrapper) throws IOException { + BinaryOutputStream out = out(); + InputStream in = inputStreamWrapper.getStream(); + int wrapperLength = inputStreamWrapper.getLength(); + + if (in == null) { + out.writeByte(GridBinaryMarshaller.NULL); + + return; + } + + int readLength; + int writtenLength = 0; + byte[] buf = new byte[DEFAULT_BUFFER_SIZE]; + + out.unsafeEnsure(1 + 4); + out.unsafeWriteByte(GridBinaryMarshaller.BYTE_ARR); + out.unsafeWriteInt(wrapperLength); + + while (-1 != (readLength = in.read(buf)) && writtenLength < wrapperLength) { + out.writeByteArray(buf, 0, readLength); + + writtenLength += readLength; + } + + if (inputStreamWrapper.getLength() != writtenLength) + throw new IOException("Input stream length mismatch. [wrapperLength= " + wrapperLength + ", " + + "writtenLength= " + writtenLength + "]"); + } +} diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/SqlInputStreamWrapper.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/SqlInputStreamWrapper.java new file mode 100644 index 00000000000000..7f9f62c5d51f19 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/SqlInputStreamWrapper.java @@ -0,0 +1,175 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.odbc; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.nio.file.Files; +import java.nio.file.Path; +import java.sql.SQLException; +import java.sql.SQLFeatureNotSupportedException; + +/** + * InputStream wrapper for limited streams. + */ +public class SqlInputStreamWrapper implements AutoCloseable { + /** */ + private InputStream inputStream; + + /** */ + private final byte[] rawData; + + /** */ + private Path tempFile; + + /** */ + private final Integer len; + + /** */ + private static final int MAX_MEMORY_BUFFER_BYTES = 51200; + + /** */ + private static final String TEMP_FILE_PREFIX = "ignite-jdbc-stream"; + + /** */ + private static final int MAX_ARRAY_SIZE = Integer.MAX_VALUE - 8; + + /** + * @param inputStream Input stream. + * @param len Length of data in the input stream. + */ + public SqlInputStreamWrapper(InputStream inputStream, Integer len) { + this.inputStream = inputStream; + this.len = len; + + rawData = null; + tempFile = null; + } + + /** + * @param inputStream Input stream. + */ + public SqlInputStreamWrapper(InputStream inputStream) throws SQLException { + try { + ByteArrayOutputStream memoryOutputStream = new ByteArrayOutputStream(); + final int memoryLength = copyStream(inputStream, memoryOutputStream, MAX_MEMORY_BUFFER_BYTES); + byte[] rawData = memoryOutputStream.toByteArray(); + + if (memoryLength == -1) { + final int diskLength; + + tempFile = Files.createTempFile(TEMP_FILE_PREFIX, ".tmp"); + + try (OutputStream diskOutputStream = Files.newOutputStream(tempFile)) { + diskOutputStream.write(rawData); + + diskLength = copyStream(inputStream, diskOutputStream, MAX_ARRAY_SIZE - rawData.length); + + if (diskLength == -1) + throw new SQLFeatureNotSupportedException("Invalid argument. InputStreams with length > " + + MAX_ARRAY_SIZE + " are not supported."); + } + catch (RuntimeException | Error | SQLException e) { + try { + tempFile.toFile().delete(); + } + catch (Throwable ignore) { + // No-op + } + + throw e; + } + + this.rawData = null; + + this.inputStream = null; + + len = rawData.length + diskLength; + } + else { + this.rawData = rawData; + + this.inputStream = null; + + len = rawData.length; + } + } + catch (IOException e) { + throw new SQLException("An I/O error occurred while sending to the backend.", e); + } + } + + /** */ + public InputStream getStream() throws IOException { + if (inputStream != null) { + return inputStream; + } + else if (tempFile != null) { + inputStream = Files.newInputStream(tempFile); + return inputStream; + } + else { + inputStream = new ByteArrayInputStream(rawData, 0, len); + } + + return inputStream; + } + + /** */ + public Integer getLength() { + return len; + } + + /** {@inheritDoc} */ + @Override public void close() throws Exception { + if (tempFile != null) { + tempFile.toFile().delete(); + tempFile = null; + + if (inputStream != null) { + inputStream.close(); + inputStream = null; + } + } + } + + /** */ + private static int copyStream(InputStream inputStream, OutputStream outputStream, int limit) throws IOException { + int totalLength = 0; + + byte[] buf = new byte[8192]; + + int readLength = inputStream.read(buf); + + while (readLength > 0) { + totalLength += readLength; + + outputStream.write(buf, 0, readLength); + + if (totalLength >= limit) { + return -1; + } + + readLength = inputStream.read(buf); + } + return totalLength; + } +} diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/SqlListenerUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/SqlListenerUtils.java index de53c276ac5794..3edac054a70068 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/SqlListenerUtils.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/SqlListenerUtils.java @@ -17,6 +17,7 @@ package org.apache.ignite.internal.processors.odbc; +import java.io.IOException; import java.math.BigDecimal; import java.sql.Time; import java.sql.Timestamp; @@ -26,7 +27,6 @@ import org.apache.ignite.cache.query.QueryCancelledException; import org.apache.ignite.internal.binary.BinaryReaderExImpl; import org.apache.ignite.internal.binary.BinaryUtils; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; import org.apache.ignite.internal.binary.GridBinaryMarshaller; import org.apache.ignite.internal.processors.cache.query.IgniteQueryErrorCode; import org.apache.ignite.internal.processors.query.IgniteSQLException; @@ -180,7 +180,7 @@ public abstract class SqlListenerUtils { * @param binObjAllow Allow to write non plain objects. * @throws BinaryObjectException On error. */ - public static void writeObject(BinaryWriterExImpl writer, @Nullable Object obj, boolean binObjAllow) + public static void writeObject(SqlBinaryWriter writer, @Nullable Object obj, boolean binObjAllow) throws BinaryObjectException { if (obj == null) { writer.writeByte(GridBinaryMarshaller.NULL); @@ -246,6 +246,14 @@ else if (cls == Timestamp[].class) writer.writeTimestampArray((Timestamp[])obj); else if (cls == java.util.Date[].class || cls == java.sql.Date[].class) writer.writeDateArray((java.util.Date[])obj); + else if (obj instanceof SqlInputStreamWrapper) { + try { + writer.writeInputStreamAsByteArray((SqlInputStreamWrapper)obj); + } + catch (IOException e) { + throw new BinaryObjectException(e); + } + } else if (binObjAllow) writer.writeObjectDetached(obj); else diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcBatchExecuteRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcBatchExecuteRequest.java index fe6f43b975b6da..609919492c6eb7 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcBatchExecuteRequest.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcBatchExecuteRequest.java @@ -21,7 +21,7 @@ import java.util.List; import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.util.tostring.GridToStringInclude; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.S; @@ -131,7 +131,7 @@ public boolean isLastStreamBatch() { /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) throws BinaryObjectException { super.writeBinary(writer, protoCtx); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcBatchExecuteResult.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcBatchExecuteResult.java index 804a4bfae57368..3e4e06e9b93f1e 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcBatchExecuteResult.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcBatchExecuteResult.java @@ -19,7 +19,7 @@ import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.util.typedef.internal.S; /** @@ -98,7 +98,7 @@ public String errorMessage() { /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) throws BinaryObjectException { super.writeBinary(writer, protoCtx); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcBinaryTypeGetRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcBinaryTypeGetRequest.java index 1a523e0769ead0..0cb8c1c9a41f2d 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcBinaryTypeGetRequest.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcBinaryTypeGetRequest.java @@ -20,7 +20,7 @@ import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.util.typedef.internal.S; /** @@ -54,7 +54,7 @@ public int typeId() { } /** {@inheritDoc} */ - @Override public void writeBinary(BinaryWriterExImpl writer, JdbcProtocolContext protoCtx) + @Override public void writeBinary(SqlBinaryWriter writer, JdbcProtocolContext protoCtx) throws BinaryObjectException { super.writeBinary(writer, protoCtx); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcBinaryTypeGetResult.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcBinaryTypeGetResult.java index 94e66fc3b2325e..13e11ec9145042 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcBinaryTypeGetResult.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcBinaryTypeGetResult.java @@ -22,7 +22,7 @@ import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.binary.BinaryMetadata; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.util.typedef.internal.S; /** @@ -70,7 +70,7 @@ public long reqId() { } /** {@inheritDoc} */ - @Override public void writeBinary(BinaryWriterExImpl writer, JdbcProtocolContext protoCtx) + @Override public void writeBinary(SqlBinaryWriter writer, JdbcProtocolContext protoCtx) throws BinaryObjectException { super.writeBinary(writer, protoCtx); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcBinaryTypeNameGetRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcBinaryTypeNameGetRequest.java index 5cc4272a81459b..7f2b38a049803d 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcBinaryTypeNameGetRequest.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcBinaryTypeNameGetRequest.java @@ -21,7 +21,7 @@ import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.MarshallerPlatformIds; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.util.typedef.internal.S; /** @@ -69,7 +69,7 @@ public byte platformId() { } /** {@inheritDoc} */ - @Override public void writeBinary(BinaryWriterExImpl writer, JdbcProtocolContext protoCtx) + @Override public void writeBinary(SqlBinaryWriter writer, JdbcProtocolContext protoCtx) throws BinaryObjectException { super.writeBinary(writer, protoCtx); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcBinaryTypeNameGetResult.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcBinaryTypeNameGetResult.java index ab66ded7b78321..3605d265ad4ad7 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcBinaryTypeNameGetResult.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcBinaryTypeNameGetResult.java @@ -20,7 +20,7 @@ import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.util.typedef.internal.S; /** @@ -68,7 +68,7 @@ public long reqId() { } /** {@inheritDoc} */ - @Override public void writeBinary(BinaryWriterExImpl writer, JdbcProtocolContext protoCtx) + @Override public void writeBinary(SqlBinaryWriter writer, JdbcProtocolContext protoCtx) throws BinaryObjectException { super.writeBinary(writer, protoCtx); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcBinaryTypeNamePutRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcBinaryTypeNamePutRequest.java index 769389df45a15f..fc298062696cb7 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcBinaryTypeNamePutRequest.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcBinaryTypeNamePutRequest.java @@ -21,7 +21,7 @@ import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.MarshallerPlatformIds; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.util.typedef.internal.S; /** @@ -83,7 +83,7 @@ public String typeName() { } /** {@inheritDoc} */ - @Override public void writeBinary(BinaryWriterExImpl writer, JdbcProtocolContext protoCtx) + @Override public void writeBinary(SqlBinaryWriter writer, JdbcProtocolContext protoCtx) throws BinaryObjectException { super.writeBinary(writer, protoCtx); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcBinaryTypePutRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcBinaryTypePutRequest.java index 630f24f38406a0..d380b94ff6ed91 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcBinaryTypePutRequest.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcBinaryTypePutRequest.java @@ -22,7 +22,7 @@ import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.binary.BinaryMetadata; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.util.typedef.internal.S; /** @@ -56,7 +56,7 @@ public BinaryMetadata meta() { } /** {@inheritDoc} */ - @Override public void writeBinary(BinaryWriterExImpl writer, JdbcProtocolContext protoCtx) throws BinaryObjectException { + @Override public void writeBinary(SqlBinaryWriter writer, JdbcProtocolContext protoCtx) throws BinaryObjectException { super.writeBinary(writer, protoCtx); try { diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcBulkLoadAckResult.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcBulkLoadAckResult.java index d469510d70030d..39e860e823d503 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcBulkLoadAckResult.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcBulkLoadAckResult.java @@ -19,8 +19,8 @@ import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; import org.apache.ignite.internal.processors.bulkload.BulkLoadAckClientParameters; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.sql.command.SqlBulkLoadCommand; import org.apache.ignite.internal.util.typedef.internal.S; @@ -82,7 +82,7 @@ public BulkLoadAckClientParameters params() { /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) throws BinaryObjectException { super.writeBinary(writer, protoCtx); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcBulkLoadBatchRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcBulkLoadBatchRequest.java index 67d0a3ac51bff8..a67f65cdbeee7e 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcBulkLoadBatchRequest.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcBulkLoadBatchRequest.java @@ -19,7 +19,7 @@ import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.sql.command.SqlBulkLoadCommand; import org.apache.ignite.internal.util.typedef.internal.S; import org.jetbrains.annotations.NotNull; @@ -142,7 +142,7 @@ public int cmd() { /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) throws BinaryObjectException { super.writeBinary(writer, protoCtx); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcCachePartitionsRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcCachePartitionsRequest.java index 7dd823bc1f4789..7694659353c230 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcCachePartitionsRequest.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcCachePartitionsRequest.java @@ -22,7 +22,7 @@ import java.util.Set; import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.util.typedef.internal.S; /** @@ -60,7 +60,7 @@ public Set cacheIds() { /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) throws BinaryObjectException { super.writeBinary(writer, protoCtx); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcCachePartitionsResult.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcCachePartitionsResult.java index d7293c685a49ea..1d39203e394c0c 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcCachePartitionsResult.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcCachePartitionsResult.java @@ -22,8 +22,8 @@ import java.util.List; import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; import org.apache.ignite.internal.jdbc.thin.JdbcThinPartitionAwarenessMappingGroup; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.util.typedef.internal.S; /** @@ -61,7 +61,7 @@ public List getMappings() { /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) throws BinaryObjectException { super.writeBinary(writer, protoCtx); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcColumnMeta.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcColumnMeta.java index 164998a6c3b5b4..039680cb3701ed 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcColumnMeta.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcColumnMeta.java @@ -18,9 +18,9 @@ package org.apache.ignite.internal.processors.odbc.jdbc; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; import org.apache.ignite.internal.jdbc.thin.JdbcThinUtils; import org.apache.ignite.internal.jdbc2.JdbcUtils; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.processors.query.GridQueryFieldMetadata; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.S; @@ -159,7 +159,7 @@ public boolean isNullable() { /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) { writer.writeString(schemaName); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcColumnMetaV2.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcColumnMetaV2.java index ddd0eef6fc6cc1..74f9029d03c7a1 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcColumnMetaV2.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcColumnMetaV2.java @@ -18,7 +18,7 @@ package org.apache.ignite.internal.processors.odbc.jdbc; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.util.typedef.internal.S; /** @@ -55,7 +55,7 @@ public JdbcColumnMetaV2(String schemaName, String tblName, String colName, Class /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) { super.writeBinary(writer, protoCtx); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcColumnMetaV3.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcColumnMetaV3.java index 3c13a6c0ccb279..13082c503cb1f9 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcColumnMetaV3.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcColumnMetaV3.java @@ -18,7 +18,7 @@ package org.apache.ignite.internal.processors.odbc.jdbc; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.util.typedef.internal.S; /** @@ -64,7 +64,7 @@ public JdbcColumnMetaV3(String schemaName, String tblName, String colName, Class /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) { super.writeBinary(writer, protoCtx); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcColumnMetaV4.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcColumnMetaV4.java index 46fdd4e30b7abf..f519aab3f49bfe 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcColumnMetaV4.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcColumnMetaV4.java @@ -18,7 +18,7 @@ package org.apache.ignite.internal.processors.odbc.jdbc; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.util.typedef.internal.S; /** @@ -69,7 +69,7 @@ public JdbcColumnMetaV4(String schemaName, String tblName, String colName, Class /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) { super.writeBinary(writer, protoCtx); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcIndexMeta.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcIndexMeta.java index abf78c038edeee..5cfb240a68a10d 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcIndexMeta.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcIndexMeta.java @@ -25,9 +25,9 @@ import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.cache.QueryIndexType; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; import org.apache.ignite.internal.cache.query.index.SortOrder; import org.apache.ignite.internal.cache.query.index.sorted.IndexKeyDefinition; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.processors.query.schema.management.IndexDescriptor; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.S; @@ -126,7 +126,7 @@ public List fieldsAsc() { /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) throws BinaryObjectException { writer.writeString(schemaName); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMessageParser.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMessageParser.java index 255012b29bef79..bf737fec9ec58b 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMessageParser.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMessageParser.java @@ -21,7 +21,6 @@ import org.apache.ignite.internal.binary.BinaryContext; import org.apache.ignite.internal.binary.BinaryReaderExImpl; import org.apache.ignite.internal.binary.BinaryThreadLocalContext; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; import org.apache.ignite.internal.binary.streams.BinaryHeapInputStream; import org.apache.ignite.internal.binary.streams.BinaryHeapOutputStream; import org.apache.ignite.internal.binary.streams.BinaryInputStream; @@ -30,6 +29,7 @@ import org.apache.ignite.internal.processors.odbc.ClientListenerRequest; import org.apache.ignite.internal.processors.odbc.ClientListenerResponse; import org.apache.ignite.internal.processors.odbc.ClientMessage; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; /** * JDBC message parser. @@ -71,8 +71,8 @@ protected BinaryReaderExImpl createReader(ClientMessage msg) { * @param cap Capacisty * @return Writer. */ - protected BinaryWriterExImpl createWriter(int cap) { - return new BinaryWriterExImpl(binCtx, new BinaryHeapOutputStream(cap), + protected SqlBinaryWriter createWriter(int cap) { + return new SqlBinaryWriter(binCtx, new BinaryHeapOutputStream(cap), BinaryThreadLocalContext.get().schemaHolder(), null); } @@ -93,7 +93,7 @@ protected BinaryWriterExImpl createWriter(int cap) { JdbcResponse res = (JdbcResponse)msg; - BinaryWriterExImpl writer = createWriter(INIT_CAP); + SqlBinaryWriter writer = createWriter(INIT_CAP); res.writeBinary(writer, protoCtx); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaColumnsRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaColumnsRequest.java index b7f81ded2491aa..203f0c6bffa68a 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaColumnsRequest.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaColumnsRequest.java @@ -19,7 +19,7 @@ import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.util.typedef.internal.S; import org.jetbrains.annotations.Nullable; @@ -79,7 +79,7 @@ public String columnName() { /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) throws BinaryObjectException { super.writeBinary(writer, protoCtx); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaColumnsResult.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaColumnsResult.java index 94590f282f1498..f044f811a70e2b 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaColumnsResult.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaColumnsResult.java @@ -23,7 +23,7 @@ import java.util.List; import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.S; @@ -78,7 +78,7 @@ public List meta() { /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) throws BinaryObjectException { super.writeBinary(writer, protoCtx); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaIndexesRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaIndexesRequest.java index 4a81f5ed134fd8..edf6f8858af9f4 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaIndexesRequest.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaIndexesRequest.java @@ -19,7 +19,7 @@ import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.util.typedef.internal.S; import org.jetbrains.annotations.Nullable; @@ -67,7 +67,7 @@ public String tableName() { /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) throws BinaryObjectException { super.writeBinary(writer, protoCtx); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaIndexesResult.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaIndexesResult.java index d9e497bc475a4e..e075f10ffa4b6b 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaIndexesResult.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaIndexesResult.java @@ -23,7 +23,7 @@ import java.util.List; import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.S; @@ -58,7 +58,7 @@ public List meta() { /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) throws BinaryObjectException { super.writeBinary(writer, protoCtx); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaParamsRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaParamsRequest.java index 827b663f6201fc..6c056b25916cd6 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaParamsRequest.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaParamsRequest.java @@ -19,7 +19,7 @@ import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.util.typedef.internal.S; /** @@ -66,7 +66,7 @@ public String sql() { /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) throws BinaryObjectException { super.writeBinary(writer, protoCtx); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaParamsResult.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaParamsResult.java index 9ae1c00a2058ea..2a4e04e85eda43 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaParamsResult.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaParamsResult.java @@ -22,7 +22,7 @@ import java.util.List; import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.S; @@ -50,7 +50,7 @@ public class JdbcMetaParamsResult extends JdbcResult { /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) throws BinaryObjectException { super.writeBinary(writer, protoCtx); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaPrimaryKeysRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaPrimaryKeysRequest.java index 047c8855df18dc..bebf694a837ff7 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaPrimaryKeysRequest.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaPrimaryKeysRequest.java @@ -19,7 +19,7 @@ import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.util.typedef.internal.S; import org.jetbrains.annotations.Nullable; @@ -67,7 +67,7 @@ public String tableName() { /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) throws BinaryObjectException { super.writeBinary(writer, protoCtx); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaPrimaryKeysResult.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaPrimaryKeysResult.java index 6a8f2f30312d12..d298ac6c2f6f7a 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaPrimaryKeysResult.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaPrimaryKeysResult.java @@ -23,7 +23,7 @@ import java.util.List; import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.S; @@ -52,7 +52,7 @@ public class JdbcMetaPrimaryKeysResult extends JdbcResult { /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) throws BinaryObjectException { super.writeBinary(writer, protoCtx); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaSchemasRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaSchemasRequest.java index 88f619257abbe9..68678c1c213da9 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaSchemasRequest.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaSchemasRequest.java @@ -19,7 +19,7 @@ import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.util.typedef.internal.S; /** @@ -54,7 +54,7 @@ public String schemaName() { /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) throws BinaryObjectException { super.writeBinary(writer, protoCtx); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaSchemasResult.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaSchemasResult.java index 0e18147d3cd670..535deffc40527e 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaSchemasResult.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaSchemasResult.java @@ -20,7 +20,7 @@ import java.util.Collection; import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.util.typedef.internal.S; /** @@ -47,7 +47,7 @@ public class JdbcMetaSchemasResult extends JdbcResult { /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) throws BinaryObjectException { super.writeBinary(writer, protoCtx); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaTablesRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaTablesRequest.java index 0a6d47ae779615..ff77c30432ee19 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaTablesRequest.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaTablesRequest.java @@ -19,7 +19,7 @@ import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.util.typedef.internal.S; /** @@ -78,7 +78,7 @@ public String[] tableTypes() { /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) throws BinaryObjectException { super.writeBinary(writer, protoCtx); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaTablesResult.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaTablesResult.java index fa6f0c16cbec18..cddad38ad3704e 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaTablesResult.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaTablesResult.java @@ -22,7 +22,7 @@ import java.util.List; import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.S; @@ -50,7 +50,7 @@ public class JdbcMetaTablesResult extends JdbcResult { /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) throws BinaryObjectException { super.writeBinary(writer, protoCtx); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcOrderedBatchExecuteRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcOrderedBatchExecuteRequest.java index 929d78cc9c57d4..766690fce7426d 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcOrderedBatchExecuteRequest.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcOrderedBatchExecuteRequest.java @@ -20,7 +20,7 @@ import java.util.List; import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.util.typedef.internal.S; import org.jetbrains.annotations.NotNull; @@ -62,7 +62,7 @@ public long order() { /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) throws BinaryObjectException { super.writeBinary(writer, protoCtx); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcOrderedBatchExecuteResult.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcOrderedBatchExecuteResult.java index e33014a816b4a8..ea36ce75763b13 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcOrderedBatchExecuteResult.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcOrderedBatchExecuteResult.java @@ -19,7 +19,7 @@ import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.util.typedef.internal.S; /** @@ -55,7 +55,7 @@ public long order() { /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) throws BinaryObjectException { super.writeBinary(writer, protoCtx); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcParameterMeta.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcParameterMeta.java index 5f953499560046..a2cbbfbb8a845a 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcParameterMeta.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcParameterMeta.java @@ -21,8 +21,8 @@ import java.sql.SQLException; import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; import org.apache.ignite.internal.jdbc.thin.JdbcThinUtils; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.processors.query.GridQueryFieldMetadata; import org.apache.ignite.internal.util.typedef.internal.S; @@ -147,7 +147,7 @@ public int mode() { /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) throws BinaryObjectException { writer.writeInt(isNullable); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcPrimaryKeyMeta.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcPrimaryKeyMeta.java index 1762217a0fa551..860cd4b22ee3ee 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcPrimaryKeyMeta.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcPrimaryKeyMeta.java @@ -20,7 +20,7 @@ import java.util.List; import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.util.typedef.F; /** @@ -90,7 +90,7 @@ public List fields() { /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) throws BinaryObjectException { writer.writeString(schemaName); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcQuery.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcQuery.java index c2390e9067ca78..7903ff523d3222 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcQuery.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcQuery.java @@ -18,7 +18,7 @@ package org.apache.ignite.internal.processors.odbc.jdbc; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.processors.odbc.SqlListenerUtils; import org.apache.ignite.internal.util.typedef.internal.S; @@ -64,7 +64,7 @@ public Object[] args() { /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) { writer.writeString(sql); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcQueryCancelRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcQueryCancelRequest.java index 48bdbd42c10039..f077badadcce66 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcQueryCancelRequest.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcQueryCancelRequest.java @@ -19,7 +19,7 @@ import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.util.typedef.internal.S; /** @@ -53,7 +53,7 @@ public long requestIdToBeCancelled() { /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) throws BinaryObjectException { super.writeBinary(writer, protoCtx); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcQueryCloseRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcQueryCloseRequest.java index 2ab14a377e3c90..e79d98f40d2946 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcQueryCloseRequest.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcQueryCloseRequest.java @@ -19,7 +19,7 @@ import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.util.typedef.internal.S; /** @@ -53,7 +53,7 @@ public long cursorId() { /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) throws BinaryObjectException { super.writeBinary(writer, protoCtx); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcQueryExecuteMultipleStatementsResult.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcQueryExecuteMultipleStatementsResult.java index 37180342a42cf9..2bb2d61fdda18f 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcQueryExecuteMultipleStatementsResult.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcQueryExecuteMultipleStatementsResult.java @@ -22,7 +22,7 @@ import java.util.List; import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.util.typedef.internal.S; /** @@ -81,7 +81,7 @@ public boolean isLast() { /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) throws BinaryObjectException { super.writeBinary(writer, protoCtx); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcQueryExecuteRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcQueryExecuteRequest.java index bace9086104f3e..26c96ec20f823e 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcQueryExecuteRequest.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcQueryExecuteRequest.java @@ -21,7 +21,7 @@ import java.sql.Statement; import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.util.tostring.GridToStringInclude; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.S; @@ -141,7 +141,7 @@ boolean autoCommit() { /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) throws BinaryObjectException { super.writeBinary(writer, protoCtx); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcQueryExecuteResult.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcQueryExecuteResult.java index cb6e847fdd853d..f78320461072dc 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcQueryExecuteResult.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcQueryExecuteResult.java @@ -20,7 +20,7 @@ import java.util.List; import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.sql.optimizer.affinity.PartitionResult; import org.apache.ignite.internal.sql.optimizer.affinity.PartitionResultMarshaler; import org.apache.ignite.internal.util.typedef.internal.S; @@ -122,7 +122,7 @@ public long updateCount() { /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) throws BinaryObjectException { super.writeBinary(writer, protoCtx); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcQueryFetchRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcQueryFetchRequest.java index 0a327d406c7503..bf5784725804a0 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcQueryFetchRequest.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcQueryFetchRequest.java @@ -19,7 +19,7 @@ import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.util.typedef.internal.S; /** @@ -66,7 +66,7 @@ public int pageSize() { /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) throws BinaryObjectException { super.writeBinary(writer, protoCtx); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcQueryFetchResult.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcQueryFetchResult.java index c8165a1119397d..b8a0975a4cf58a 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcQueryFetchResult.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcQueryFetchResult.java @@ -20,7 +20,7 @@ import java.util.List; import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.util.typedef.internal.S; /** @@ -67,7 +67,7 @@ public boolean last() { /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) throws BinaryObjectException { super.writeBinary(writer, protoCtx); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcQueryMetadataRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcQueryMetadataRequest.java index 82bc8dd2b57b0c..19e26174adfbbc 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcQueryMetadataRequest.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcQueryMetadataRequest.java @@ -19,7 +19,7 @@ import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.util.typedef.internal.S; /** @@ -54,7 +54,7 @@ public long cursorId() { /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) throws BinaryObjectException { super.writeBinary(writer, protoCtx); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcQueryMetadataResult.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcQueryMetadataResult.java index 7a5b07723d016d..bbce5b4dbce147 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcQueryMetadataResult.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcQueryMetadataResult.java @@ -22,7 +22,7 @@ import java.util.List; import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.S; @@ -59,7 +59,7 @@ public List meta() { /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) throws BinaryObjectException { super.writeBinary(writer, protoCtx); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcRawBinarylizable.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcRawBinarylizable.java index c768876b90a241..f1c4c6cf999b69 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcRawBinarylizable.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcRawBinarylizable.java @@ -19,7 +19,7 @@ import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; /** * Interface that allows to implement custom serialization @@ -33,7 +33,7 @@ public interface JdbcRawBinarylizable { * @param protoCtx JDBC protocol context. * @throws BinaryObjectException In case of error. */ - public void writeBinary(BinaryWriterExImpl writer, JdbcProtocolContext protoCtx) throws BinaryObjectException; + public void writeBinary(SqlBinaryWriter writer, JdbcProtocolContext protoCtx) throws BinaryObjectException; /** * Reads fields from provided reader. diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcRequest.java index 34c6882f54f7d7..aae08cc8036424 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcRequest.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcRequest.java @@ -21,10 +21,10 @@ import org.apache.ignite.IgniteException; import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; import org.apache.ignite.internal.binary.streams.BinaryHeapInputStream; import org.apache.ignite.internal.binary.streams.BinaryInputStream; import org.apache.ignite.internal.processors.odbc.ClientListenerRequestNoId; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.util.typedef.internal.S; /** @@ -108,7 +108,7 @@ public JdbcRequest(byte type) { /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) throws BinaryObjectException { writer.writeByte(type); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcResponse.java index 4a941a6ffd2783..f67f8ee5713e3d 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcResponse.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcResponse.java @@ -19,9 +19,9 @@ import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion; import org.apache.ignite.internal.processors.odbc.ClientListenerResponse; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.util.tostring.GridToStringInclude; import org.apache.ignite.internal.util.typedef.internal.S; import org.jetbrains.annotations.Nullable; @@ -116,7 +116,7 @@ public void activeTransaction(boolean activeTx) { /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) throws BinaryObjectException { writer.writeInt(status()); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcResult.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcResult.java index b149366de45b9c..2ddfc9941be6ee 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcResult.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcResult.java @@ -20,7 +20,7 @@ import org.apache.ignite.IgniteException; import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.util.typedef.internal.S; /** @@ -101,7 +101,7 @@ public JdbcResult(byte type) { /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) throws BinaryObjectException { writer.writeByte(type); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcResultInfo.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcResultInfo.java index 8c3a09e908e388..6fe2ac94fdb4a5 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcResultInfo.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcResultInfo.java @@ -18,7 +18,7 @@ package org.apache.ignite.internal.processors.odbc.jdbc; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.util.typedef.internal.S; /** @@ -76,7 +76,7 @@ public long updateCount() { /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) { writer.writeBoolean(isQuery); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcTableMeta.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcTableMeta.java index 4398ceae8359b6..53d6e1625892c8 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcTableMeta.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcTableMeta.java @@ -20,7 +20,7 @@ import java.util.Objects; import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.S; @@ -80,7 +80,7 @@ public String tableType() { /** {@inheritDoc} */ @Override public void writeBinary( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, JdbcProtocolContext protoCtx ) throws BinaryObjectException { writer.writeString(schemaName); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcUpdateBinarySchemaResult.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcUpdateBinarySchemaResult.java index e1e20cf84298a7..d7c48911942ff9 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcUpdateBinarySchemaResult.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcUpdateBinarySchemaResult.java @@ -19,7 +19,7 @@ import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.util.typedef.internal.S; /** @@ -67,7 +67,7 @@ public long reqId() { } /** {@inheritDoc} */ - @Override public void writeBinary(BinaryWriterExImpl writer, JdbcProtocolContext protoCtx) throws BinaryObjectException { + @Override public void writeBinary(SqlBinaryWriter writer, JdbcProtocolContext protoCtx) throws BinaryObjectException { super.writeBinary(writer, protoCtx); writer.writeLong(reqId); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcUtils.java index 74af149e45ce7e..a0899363a4c24c 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcUtils.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcUtils.java @@ -25,6 +25,7 @@ import org.apache.ignite.internal.binary.BinaryReaderExImpl; import org.apache.ignite.internal.binary.BinaryWriterExImpl; import org.apache.ignite.internal.binary.GridBinaryMarshaller; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.processors.odbc.SqlListenerUtils; import org.jetbrains.annotations.Nullable; @@ -36,7 +37,7 @@ public class JdbcUtils { * @param writer Binary writer. * @param items Query results items. */ - public static void writeItems(BinaryWriterExImpl writer, List> items, JdbcProtocolContext protoCtx) { + public static void writeItems(SqlBinaryWriter writer, List> items, JdbcProtocolContext protoCtx) { writer.writeInt(items.size()); for (List row : items) { @@ -154,7 +155,7 @@ public static void writeNullableInteger(BinaryWriterExImpl writer, @Nullable Int * @throws BinaryObjectException On error. */ public static void writeObject( - BinaryWriterExImpl writer, + SqlBinaryWriter writer, @Nullable Object obj, JdbcProtocolContext protoCtx ) throws BinaryObjectException { diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcMessageParser.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcMessageParser.java index 5a64524cbe48ae..98afbcbcc1a7cf 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcMessageParser.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcMessageParser.java @@ -35,6 +35,7 @@ import org.apache.ignite.internal.processors.odbc.ClientListenerRequest; import org.apache.ignite.internal.processors.odbc.ClientListenerResponse; import org.apache.ignite.internal.processors.odbc.ClientMessage; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.processors.odbc.SqlListenerUtils; import org.jetbrains.annotations.NotNull; @@ -258,7 +259,7 @@ public OdbcMessageParser(GridKernalContext ctx, ClientListenerProtocolVersion ve OdbcResponse msg = (OdbcResponse)msg0; // Creating new binary writer - BinaryWriterExImpl writer = new BinaryWriterExImpl(marsh.context(), new BinaryHeapOutputStream(INIT_CAP), + SqlBinaryWriter writer = new SqlBinaryWriter(marsh.context(), new BinaryHeapOutputStream(INIT_CAP), BinaryThreadLocalContext.get().schemaHolder(), null); // Writing status. diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcQuery.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcQuery.java index d89cc0d94ad193..058cd916b18e77 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcQuery.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcQuery.java @@ -18,7 +18,7 @@ package org.apache.ignite.internal.processors.odbc.odbc; import org.apache.ignite.internal.binary.BinaryReaderExImpl; -import org.apache.ignite.internal.binary.BinaryWriterExImpl; +import org.apache.ignite.internal.processors.odbc.SqlBinaryWriter; import org.apache.ignite.internal.processors.odbc.SqlListenerUtils; import org.apache.ignite.internal.util.typedef.internal.S; @@ -58,7 +58,7 @@ public Object[] args() { * * @param writer Binary object writer. */ - public void writeBinary(BinaryWriterExImpl writer) { + public void writeBinary(SqlBinaryWriter writer) { writer.writeString(sql); if (args == null || args.length == 0)