Class JdbcUtils
- java.lang.Object
-
- org.apache.ignite.internal.processors.odbc.jdbc.JdbcUtils
-
public class JdbcUtils extends Object
Various JDBC utility methods.
-
-
Constructor Summary
Constructors Constructor Description JdbcUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<List<Object>>readItems(BinaryReaderExImpl reader, JdbcProtocolContext protoCtx)static @Nullable IntegerreadNullableInteger(BinaryReaderExImpl reader)Read nullable Integer.static @Nullable ObjectreadObject(BinaryReaderExImpl reader, JdbcProtocolContext protoCtx)static @Nullable ObjectreadObject(BinaryReaderExImpl reader, JdbcProtocolContext protoCtx, boolean createByteArrayCopy)static List<String>readStringList(BinaryReaderExImpl reader)static voidwriteItems(BinaryWriterExImpl writer, List<List<Object>> items, JdbcProtocolContext protoCtx)static voidwriteNullableInteger(BinaryWriterExImpl writer, @Nullable Integer val)Write nullable integer.static voidwriteObject(BinaryWriterExImpl writer, @Nullable Object obj, JdbcProtocolContext protoCtx)static voidwriteStringCollection(BinaryWriterExImpl writer, Collection<String> lst)
-
-
-
Method Detail
-
writeItems
public static void writeItems(BinaryWriterExImpl writer, List<List<Object>> items, JdbcProtocolContext protoCtx)
- Parameters:
writer- Binary writer.items- Query results items.
-
readItems
public static List<List<Object>> readItems(BinaryReaderExImpl reader, JdbcProtocolContext protoCtx)
- Parameters:
reader- Binary reader.- Returns:
- Query results items.
-
writeStringCollection
public static void writeStringCollection(BinaryWriterExImpl writer, Collection<String> lst)
- Parameters:
writer- Binary writer.lst- List to write.
-
readStringList
public static List<String> readStringList(BinaryReaderExImpl reader)
- Parameters:
reader- Binary reader.- Returns:
- List of string.
-
readNullableInteger
@Nullable public static @Nullable Integer readNullableInteger(BinaryReaderExImpl reader)
Read nullable Integer.- Parameters:
reader- Binary reader.- Returns:
- read value.
-
writeNullableInteger
public static void writeNullableInteger(BinaryWriterExImpl writer, @Nullable @Nullable Integer val)
Write nullable integer.- Parameters:
writer- Binary writer.val- Integer value..
-
readObject
@Nullable public static @Nullable Object readObject(BinaryReaderExImpl reader, JdbcProtocolContext protoCtx, boolean createByteArrayCopy) throws BinaryObjectException
- Parameters:
reader- Reader.protoCtx- Protocol context.createByteArrayCopy- Whether to create new copy or copy-on-write buffer for byte array.- Returns:
- Read object.
- Throws:
BinaryObjectException- On error.
-
readObject
@Nullable public static @Nullable Object readObject(BinaryReaderExImpl reader, JdbcProtocolContext protoCtx) throws BinaryObjectException
- Parameters:
reader- Reader.protoCtx- Protocol context.- Returns:
- Read object.
- Throws:
BinaryObjectException- On error.
-
writeObject
public static void writeObject(BinaryWriterExImpl writer, @Nullable @Nullable Object obj, JdbcProtocolContext protoCtx) throws BinaryObjectException
- Parameters:
writer- Writer.obj- Object to write.protoCtx- Protocol context.- Throws:
BinaryObjectException- On error.
-
-