public interface Codec<T>
| Modifier and Type | Method and Description |
|---|---|
boolean |
canDecode(com.singlestore.jdbc.client.Column column,
Class<?> type) |
boolean |
canEncode(Object value) |
default boolean |
canEncodeLongData() |
String |
className() |
T |
decodeBinary(com.singlestore.jdbc.client.ReadableByteBuf buffer,
int length,
com.singlestore.jdbc.client.Column column,
Calendar cal) |
T |
decodeText(com.singlestore.jdbc.client.ReadableByteBuf buffer,
int length,
com.singlestore.jdbc.client.Column column,
Calendar cal) |
void |
encodeBinary(Writer encoder,
Object value,
Calendar cal,
Long length) |
default void |
encodeBinaryAsString(Writer encoder,
Object value,
Long length) |
default byte[] |
encodeData(T value,
Long length) |
default void |
encodeLongData(Writer encoder,
T value,
Long length) |
void |
encodeText(Writer encoder,
com.singlestore.jdbc.client.Context context,
Object value,
Calendar cal,
Long length) |
int |
getBinaryEncodeType() |
String className()
boolean canDecode(com.singlestore.jdbc.client.Column column,
Class<?> type)
boolean canEncode(Object value)
T decodeText(com.singlestore.jdbc.client.ReadableByteBuf buffer, int length, com.singlestore.jdbc.client.Column column, Calendar cal) throws SQLDataException
SQLDataExceptionT decodeBinary(com.singlestore.jdbc.client.ReadableByteBuf buffer, int length, com.singlestore.jdbc.client.Column column, Calendar cal) throws SQLDataException
SQLDataExceptionvoid encodeText(Writer encoder, com.singlestore.jdbc.client.Context context, Object value, Calendar cal, Long length) throws IOException, SQLException
IOExceptionSQLExceptionvoid encodeBinary(Writer encoder, Object value, Calendar cal, Long length) throws IOException, SQLException
IOExceptionSQLExceptiondefault boolean canEncodeLongData()
default void encodeLongData(Writer encoder, T value, Long length) throws IOException, SQLException
IOExceptionSQLExceptiondefault byte[] encodeData(T value, Long length) throws IOException, SQLException
IOExceptionSQLExceptiondefault void encodeBinaryAsString(Writer encoder, Object value, Long length) throws IOException
IOExceptionint getBinaryEncodeType()
Copyright © 2023 SingleStore. All rights reserved.