Class VectorCodec
java.lang.Object
io.r2dbc.postgresql.codec.VectorCodec
- All Implemented Interfaces:
Codec<Vector>, CodecMetadata
Codec for pgvector.
- Since:
- 1.0.3
-
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanDetermine whether thisCodecis capable of encoding thevalue.booleancanEncodeNull(Class<?> type) decode(@Nullable io.netty.buffer.ByteBuf buffer, int dataType, io.r2dbc.postgresql.message.Format format, Class<? extends Vector> type) Decode thebufferand return it as the requestedtype.decode(io.netty.buffer.ByteBuf buffer, PostgresTypeIdentifier dataType, io.r2dbc.postgresql.message.Format format, Class<? extends Vector> type) io.r2dbc.postgresql.client.EncodedParameterEncode thevalueto be used as RPC parameter.io.r2dbc.postgresql.client.EncodedParameterEncode thevalueto be used as RPC parameter.io.r2dbc.postgresql.client.EncodedParameterEncode anullvalue.encodeToText(Vector value) Iterable<? extends PostgresTypeIdentifier> 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
-
Method Details
-
encodeNull
public io.r2dbc.postgresql.client.EncodedParameter encodeNull()Description copied from interface:CodecEncode anullvalue.- Specified by:
encodeNullin interfaceCodec<Vector>- Returns:
- the encoded
nullvalue
-
type
Description copied from interface:CodecMetadataReturns the Javatypeof this codec.- Specified by:
typein interfaceCodecMetadata- Returns:
- the Java type
-
getArrayDataType
-
getDataTypes
Description copied from interface:CodecMetadataReturns the collection ofPostgresTypeIdentifierthis codec can handle- Specified by:
getDataTypesin interfaceCodecMetadata- Returns:
- the datatypes
-
canDecode
-
canEncode
-
canEncodeNull
-
decode
public Vector decode(io.netty.buffer.ByteBuf buffer, PostgresTypeIdentifier dataType, io.r2dbc.postgresql.message.Format format, Class<? extends Vector> type) -
decode
-
encode
-
encode
Description copied from interface:CodecEncode thevalueto be used as RPC parameter. -
encodeToText
-