Class ComStmtPrepare


  • public class ComStmtPrepare
    extends java.lang.Object
    • Field Detail

      • protocol

        private final Protocol protocol
      • sql

        private final java.lang.String sql
    • Constructor Detail

      • ComStmtPrepare

        public ComStmtPrepare​(Protocol protocol,
                              java.lang.String sql)
    • Method Detail

      • send

        public void send​(PacketOutputStream pos)
                  throws java.io.IOException
        Send directly to socket the sql data.
        Parameters:
        pos - the writer
        Throws:
        java.io.IOException - if connection error occur
      • read

        public ServerPrepareResult read​(PacketInputStream reader,
                                        boolean eofDeprecated)
                                 throws java.io.IOException,
                                        java.sql.SQLException
        Read COM_PREPARE_RESULT.
        Parameters:
        reader - inputStream
        eofDeprecated - are EOF_packet deprecated
        Returns:
        ServerPrepareResult prepare result
        Throws:
        java.io.IOException - if connection has error
        java.sql.SQLException - if server answer with error.
      • buildErrorException

        private java.sql.SQLException buildErrorException​(Buffer buffer)