Interface ArrayEncoding.ArrayEncoder<A>

    • Method Detail

      • getDefaultArrayTypeOid

        int getDefaultArrayTypeOid()
        The default array type oid supported by this instance.
        Returns:
        The default array type oid supported by this instance.
      • toArrayString

        java.lang.String toArrayString​(char delim,
                                       A array)
        Creates String representation of the array.
        Parameters:
        delim - The character to use to delimit between elements.
        array - The array to represent as a String.
        Returns:
        String representation of the array.
      • supportBinaryRepresentation

        boolean supportBinaryRepresentation​(int oid)
        Indicates if an array can be encoded in binary form to array oid.
        Parameters:
        oid - The array oid to see check for binary support.
        Returns:
        Indication of whether toBinaryRepresentation(BaseConnection, Object, int) is supported for oid.
      • toBinaryRepresentation

        byte[] toBinaryRepresentation​(BaseConnection connection,
                                      A array,
                                      int oid)
                               throws java.sql.SQLException,
                                      java.sql.SQLFeatureNotSupportedException
        Creates binary representation of the array.
        Parameters:
        connection - The connection the binary representation will be used on. Attributes from the connection might impact how values are translated to binary.
        array - The array to binary encode. Must not be null, but may contain null elements.
        oid - The array type oid to use. Calls to supportBinaryRepresentation(int) must have returned true.
        Returns:
        The binary representation of array.
        Throws:
        java.sql.SQLFeatureNotSupportedException - If supportBinaryRepresentation(int) is false for oid.
        java.sql.SQLException