Class OffsetTimeCodec
java.lang.Object
io.r2dbc.postgresql.codec.OffsetTimeCodec
- All Implemented Interfaces:
Codec<OffsetTime>, CodecMetadata
-
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanDetermine whether thisCodecis capable of encoding thevalue.booleancanEncodeNull(Class<?> type) final OffsetTimedecode(@Nullable io.netty.buffer.ByteBuf buffer, int dataType, io.r2dbc.postgresql.message.Format format, Class<? extends OffsetTime> type) Decode thebufferand return it as the requestedtype.decode(io.netty.buffer.ByteBuf buffer, PostgresTypeIdentifier dataType, io.r2dbc.postgresql.message.Format format, Class<? extends OffsetTime> type) Forwarding method todoDecode(ByteBuf, PostgresTypeIdentifier, Format, Class)for subclasses that want to implementArrayCodecDelegate.decode(io.netty.buffer.ByteBuf buffer, PostgresTypeIdentifier dataType, io.r2dbc.postgresql.message.Format format, Class<? extends OffsetTime> type) Decode thebufferand return it as the requestedtype.final io.r2dbc.postgresql.client.EncodedParameterEncode thevalueto be used as RPC parameter.io.r2dbc.postgresql.client.EncodedParameterEncode thevalueto be used as RPC parameter.final io.r2dbc.postgresql.client.EncodedParameterEncode anullvalue.io.r2dbc.postgresql.client.EncodedParameterencodeNull(int dataType) final StringencodeToText(OffsetTime value) final PostgresTypeIdentifierstatic PostgresTypeIdentifiergetDataType(int dataType) Returns the collection ofPostgresTypeIdentifierthis codec can handleClass<?> type()Returns the Javatypeof this codec.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CodecMetadata
getFormats, type
-
Method Details
-
canDecode
-
encodeToText
-
encodeNull
public final io.r2dbc.postgresql.client.EncodedParameter encodeNull()Description copied from interface:CodecEncode anullvalue.- Specified by:
encodeNullin interfaceCodec<T>- Returns:
- the encoded
nullvalue
-
getDataTypes
Description copied from interface:CodecMetadataReturns the collection ofPostgresTypeIdentifierthis codec can handle- Specified by:
getDataTypesin interfaceCodecMetadata- Returns:
- the datatypes
-
getArrayDataType
-
decode
OffsetTime decode(io.netty.buffer.ByteBuf buffer, PostgresTypeIdentifier dataType, io.r2dbc.postgresql.message.Format format, Class<? extends OffsetTime> type) Decode thebufferand return it as the requestedtype.- Parameters:
buffer- the data bufferdataType- the Postgres OID to encodeformat- the data typeFormat, text or binarytype- the desired value type- Returns:
- the decoded value. Can be
nullif the value isnull.
-
canEncode
-
canEncodeNull
Description copied from interface:Codec- Specified by:
canEncodeNullin interfaceCodec<T>- Parameters:
type- the desired value type- Returns:
trueif thisCodecis able to encodenullvalues for the givenClasstype.- See Also:
-
decode
public final OffsetTime decode(@Nullable io.netty.buffer.ByteBuf buffer, int dataType, io.r2dbc.postgresql.message.Format format, Class<? extends OffsetTime> type) Description copied from interface:CodecDecode thebufferand return it as the requestedtype. -
encode
-
encode
Description copied from interface:CodecEncode thevalueto be used as RPC parameter. -
getDataType
-
encodeNull
public io.r2dbc.postgresql.client.EncodedParameter encodeNull(int dataType) -
type
Description copied from interface:CodecMetadataReturns the Javatypeof this codec.- Specified by:
typein interfaceCodecMetadata- Returns:
- the Java type
-
decode
public OffsetTime decode(io.netty.buffer.ByteBuf buffer, PostgresTypeIdentifier dataType, io.r2dbc.postgresql.message.Format format, Class<? extends OffsetTime> type) Forwarding method todoDecode(ByteBuf, PostgresTypeIdentifier, Format, Class)for subclasses that want to implementArrayCodecDelegate.- Parameters:
buffer- the data bufferdataType- the well-knowntype OIDformat- data type formattype- the desired value type- Returns:
- the decoded value, can be
nullif the column value isnull
-