Interface Parameter

    • Method Detail

      • encodeText

        void encodeText​(Writer encoder,
                        Context context)
                 throws java.io.IOException,
                        java.sql.SQLException
        Encode parameter in text format
        Parameters:
        encoder - packet writer
        context - connection context
        Throws:
        java.io.IOException - if socket error occurs
        java.sql.SQLException - if other kind of error occurs
      • encodeBinary

        void encodeBinary​(Writer encoder,
                          Context context)
                   throws java.io.IOException,
                          java.sql.SQLException
        Encode parameter in binary format
        Parameters:
        encoder - packet writer
        context - connection context
        Throws:
        java.io.IOException - if socket error occurs
        java.sql.SQLException - if other kind of error occurs
      • encodeLongData

        void encodeLongData​(Writer encoder)
                     throws java.io.IOException,
                            java.sql.SQLException
        Encode parameter in binary long format
        Parameters:
        encoder - packet writer
        Throws:
        java.io.IOException - if socket error occurs
        java.sql.SQLException - if other kind of error occurs
      • encodeData

        byte[] encodeData()
                   throws java.io.IOException,
                          java.sql.SQLException
        transform parameter in byte array
        Returns:
        bytes
        Throws:
        java.io.IOException - if socket error occurs
        java.sql.SQLException - if other kind of error occurs
      • canEncodeLongData

        boolean canEncodeLongData()
        Can parameter be encoded in binary long format
        Returns:
        can parameter be encoded in binary long format
      • getBinaryEncodeType

        int getBinaryEncodeType()
        return binary encoding type
        Returns:
        binary encoding type
      • isNull

        boolean isNull()
        is parameter null
        Returns:
        is null
      • bestEffortStringValue

        java.lang.String bestEffortStringValue​(Context context)
        Methods to return parameter as string if possible (Streaming parameter will return null)
        Parameters:
        context - current connection context
        Returns:
        null if not available.