T - the type that is handled by this codec.public interface Codec<T>
Format.
Codecs can decode one or more server-specific data types and represent them as a specific Java type. The type parameter of Codec
indicates the interchange type that is handled by this codec.
PostgresqlObjectId| Modifier and Type | Method and Description |
|---|---|
boolean |
canDecode(int dataType,
io.r2dbc.postgresql.message.Format format,
Class<?> type)
|
boolean |
canEncode(Object value)
Determine whether this
Codec is capable of encoding the value. |
boolean |
canEncodeNull(Class<?> type)
|
T |
decode(io.netty.buffer.ByteBuf buffer,
int dataType,
io.r2dbc.postgresql.message.Format format,
Class<? extends T> type)
Decode the
buffer and return it as the requested type. |
io.r2dbc.postgresql.client.EncodedParameter |
encode(Object value)
Encode the
value to be used as RPC parameter. |
io.r2dbc.postgresql.client.EncodedParameter |
encode(Object value,
int dataType)
Encode the
value to be used as RPC parameter. |
io.r2dbc.postgresql.client.EncodedParameter |
encodeNull()
Encode a
null value. |
boolean canDecode(int dataType,
io.r2dbc.postgresql.message.Format format,
Class<?> type)
Codec is capable of decoding a value for the given dataType and Format and whether it can represent the decoded value as the desired
type.dataType - the Postgres OID to decodeformat - the data type Format, text or binarytype - the desired value typetrue if this codec is able to decode values for tge given dataType and Formatboolean canEncode(Object value)
Codec is capable of encoding the value.value - the parameter valuetrue if this Codec is able to encode the value.encode(java.lang.Object)boolean canEncodeNull(Class<?> type)
type - the desired value typetrue if this Codec is able to encode null values for the given Class type.encodeNull()@Nullable T decode(@Nullable io.netty.buffer.ByteBuf buffer, int dataType, io.r2dbc.postgresql.message.Format format, Class<? extends T> type)
buffer and return it as the requested type.buffer - the data bufferdataType - the Postgres OID to encodeformat - the data type Format, text or binarytype - the desired value typenull if the value is null.io.r2dbc.postgresql.client.EncodedParameter encode(Object value)
value to be used as RPC parameter.value - the valueio.r2dbc.postgresql.client.EncodedParameter encode(Object value, int dataType)
value to be used as RPC parameter.value - the valuedataType - the Postgres OID to encodeio.r2dbc.postgresql.client.EncodedParameter encodeNull()
null value.null valueCopyright © 2023. All rights reserved.