Class EnumArrayCodec

  • All Implemented Interfaces:
    io.r2dbc.postgresql.codec.Codec<String[]>

    public class EnumArrayCodec
    extends Object
    implements io.r2dbc.postgresql.codec.Codec<String[]>
    EnumArray R2DBC codec to represent an enum array as string array.

    this implementation is based on AbstractArrayCodec

    • Constructor Detail

      • EnumArrayCodec

        public EnumArrayCodec​(Set<Integer> dataTypes)
    • Method Detail

      • canEncode

        public boolean canEncode​(Object value)
        Specified by:
        canEncode in interface io.r2dbc.postgresql.codec.Codec<String[]>
      • canEncodeNull

        public boolean canEncodeNull​(Class<?> type)
        Specified by:
        canEncodeNull in interface io.r2dbc.postgresql.codec.Codec<String[]>
      • decode

        public String[] decode​(io.netty.buffer.ByteBuf buffer,
                               int dataType,
                               io.r2dbc.postgresql.message.Format format,
                               Class<? extends String[]> type)
        Specified by:
        decode in interface io.r2dbc.postgresql.codec.Codec<String[]>
      • encode

        public io.r2dbc.postgresql.client.Parameter encode​(Object value)
        Specified by:
        encode in interface io.r2dbc.postgresql.codec.Codec<String[]>
      • encodeNull

        public io.r2dbc.postgresql.client.Parameter encodeNull()
        Specified by:
        encodeNull in interface io.r2dbc.postgresql.codec.Codec<String[]>
      • canDecode

        public boolean canDecode​(int dataType,
                                 io.r2dbc.postgresql.message.Format format,
                                 Class<?> type)
        Specified by:
        canDecode in interface io.r2dbc.postgresql.codec.Codec<String[]>