public interface Codecs
| Modifier and Type | Method and Description |
|---|---|
static CodecsBuilder |
builder(io.netty.buffer.ByteBufAllocator allocator)
Create a builder from a
ByteBufAllocator. |
<T> T |
decode(io.asyncer.r2dbc.mysql.message.FieldValue value,
MySqlColumnMetadata metadata,
Class<?> type,
boolean binary,
CodecContext context)
Decode a
FieldValue as specified type. |
<T> T |
decode(io.asyncer.r2dbc.mysql.message.FieldValue value,
MySqlColumnMetadata metadata,
ParameterizedType type,
boolean binary,
CodecContext context)
Decode a
FieldValue as a specified type. |
<T> T |
decodeLastInsertId(long value,
Class<?> type)
Decode the last inserted ID from
OkMessage as a specified type. |
MySqlParameter |
encode(Object value,
CodecContext context)
Encode a value to a
MySqlParameter. |
MySqlParameter |
encodeNull()
Encode a null
MySqlParameter. |
@Nullable
<T> T decode(io.asyncer.r2dbc.mysql.message.FieldValue value,
MySqlColumnMetadata metadata,
Class<?> type,
boolean binary,
CodecContext context)
FieldValue as specified type.T - the generic result type.value - the FieldValue.metadata - the metadata of the column.type - the specified Class.binary - if the value should be decoded by binary protocol.context - the codec context.IllegalArgumentException - if any parameter is null, or value cannot be decoded.@Nullable
<T> T decode(io.asyncer.r2dbc.mysql.message.FieldValue value,
MySqlColumnMetadata metadata,
ParameterizedType type,
boolean binary,
CodecContext context)
FieldValue as a specified type.T - the generic result type.value - the FieldValue.metadata - the metadata of the column.type - the specified ParameterizedType.binary - if the value should be decoded by binary protocol.context - the codec context.IllegalArgumentException - if any parameter is null, or value cannot be decoded.<T> T decodeLastInsertId(long value,
Class<?> type)
OkMessage as a specified type.T - the generic result type.value - the last inserted ID.type - the specified Class.IllegalArgumentException - if type is null, or cannot decode a last inserted ID
as type.MySqlParameter encode(Object value, CodecContext context)
MySqlParameter.value - the value which should be decoded.context - the codec context.MySqlParameter.IllegalArgumentException - if any parameter is null, or value cannot be encoded.MySqlParameter encodeNull()
MySqlParameter.MySqlParameter take a null value.static CodecsBuilder builder(io.netty.buffer.ByteBufAllocator allocator)
ByteBufAllocator.allocator - the ByteBufAllocator.CodecsBuilder.Copyright © 2018–2023 asyncer.io. All rights reserved.