Class StandardClient

    • Field Detail

      • writer

        protected Writer writer
      • context

        protected org.mariadb.jdbc.client.Context context
    • Method Detail

      • destroySocket

        protected void destroySocket()
        Closing socket in case of Connection error after socket creation.
      • createSessionVariableQuery

        public String createSessionVariableQuery​(String serverTz)
      • setReadOnly

        public void setReadOnly​(boolean readOnly)
                         throws SQLException
        Specified by:
        setReadOnly in interface org.mariadb.jdbc.client.Client
        Throws:
        SQLException
      • sendQuery

        public int sendQuery​(org.mariadb.jdbc.message.ClientMessage message)
                      throws SQLException
        Throws:
        SQLException
      • execute

        public List<org.mariadb.jdbc.client.Completion> execute​(org.mariadb.jdbc.message.ClientMessage message)
                                                         throws SQLException
        Specified by:
        execute in interface org.mariadb.jdbc.client.Client
        Throws:
        SQLException
      • execute

        public List<org.mariadb.jdbc.client.Completion> execute​(org.mariadb.jdbc.message.ClientMessage message,
                                                                Statement stmt)
                                                         throws SQLException
        Specified by:
        execute in interface org.mariadb.jdbc.client.Client
        Throws:
        SQLException
      • executePipeline

        public List<org.mariadb.jdbc.client.Completion> executePipeline​(org.mariadb.jdbc.message.ClientMessage[] messages,
                                                                        Statement stmt,
                                                                        int fetchSize,
                                                                        long maxRows,
                                                                        int resultSetConcurrency,
                                                                        int resultSetType,
                                                                        boolean closeOnCompletion)
                                                                 throws SQLException
        Specified by:
        executePipeline in interface org.mariadb.jdbc.client.Client
        Throws:
        SQLException
      • execute

        public List<org.mariadb.jdbc.client.Completion> execute​(org.mariadb.jdbc.message.ClientMessage message,
                                                                Statement stmt,
                                                                int fetchSize,
                                                                long maxRows,
                                                                int resultSetConcurrency,
                                                                int resultSetType,
                                                                boolean closeOnCompletion)
                                                         throws SQLException
        Specified by:
        execute in interface org.mariadb.jdbc.client.Client
        Throws:
        SQLException
      • readResponse

        public List<org.mariadb.jdbc.client.Completion> readResponse​(Statement stmt,
                                                                     org.mariadb.jdbc.message.ClientMessage message,
                                                                     int fetchSize,
                                                                     long maxRows,
                                                                     int resultSetConcurrency,
                                                                     int resultSetType,
                                                                     boolean closeOnCompletion)
                                                              throws SQLException
        Throws:
        SQLException
      • readResponse

        public void readResponse​(org.mariadb.jdbc.message.ClientMessage message)
                          throws SQLException
        Throws:
        SQLException
      • closePrepare

        public void closePrepare​(Prepare prepare)
                          throws SQLException
        Specified by:
        closePrepare in interface org.mariadb.jdbc.client.Client
        Throws:
        SQLException
      • readStreamingResults

        public void readStreamingResults​(List<org.mariadb.jdbc.client.Completion> completions,
                                         int fetchSize,
                                         long maxRows,
                                         int resultSetConcurrency,
                                         int resultSetType,
                                         boolean closeOnCompletion)
                                  throws SQLException
        Specified by:
        readStreamingResults in interface org.mariadb.jdbc.client.Client
        Throws:
        SQLException
      • readPacket

        public org.mariadb.jdbc.client.Completion readPacket​(org.mariadb.jdbc.message.ClientMessage message)
                                                      throws SQLException
        Throws:
        SQLException
      • readPacket

        public org.mariadb.jdbc.client.Completion readPacket​(Statement stmt,
                                                             org.mariadb.jdbc.message.ClientMessage message,
                                                             int fetchSize,
                                                             long maxRows,
                                                             int resultSetConcurrency,
                                                             int resultSetType,
                                                             boolean closeOnCompletion)
                                                      throws SQLException
        Read server response packet.
        Parameters:
        stmt - current statement (null if internal)
        message - current message
        fetchSize - default fetch size
        maxRows - maximum row number
        resultSetConcurrency - concurrency
        resultSetType - type
        closeOnCompletion - must resultset close statement on completion
        Returns:
        Completion
        Throws:
        SQLException - if any exception
        See Also:
        server response packets
      • getWaitTimeout

        public int getWaitTimeout()
        Specified by:
        getWaitTimeout in interface org.mariadb.jdbc.client.Client
      • isClosed

        public boolean isClosed()
        Specified by:
        isClosed in interface org.mariadb.jdbc.client.Client
      • getContext

        public org.mariadb.jdbc.client.Context getContext()
        Specified by:
        getContext in interface org.mariadb.jdbc.client.Client
      • getSocketTimeout

        public int getSocketTimeout()
        Specified by:
        getSocketTimeout in interface org.mariadb.jdbc.client.Client
      • setSocketTimeout

        public void setSocketTimeout​(int milliseconds)
                              throws SQLException
        Specified by:
        setSocketTimeout in interface org.mariadb.jdbc.client.Client
        Throws:
        SQLException
      • close

        public void close()
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface org.mariadb.jdbc.client.Client
      • isPrimary

        public boolean isPrimary()
        Specified by:
        isPrimary in interface org.mariadb.jdbc.client.Client
      • getExceptionFactory

        public ExceptionFactory getExceptionFactory()
        Specified by:
        getExceptionFactory in interface org.mariadb.jdbc.client.Client
      • getHostAddress

        public HostAddress getHostAddress()
        Specified by:
        getHostAddress in interface org.mariadb.jdbc.client.Client
      • reset

        public void reset()
        Specified by:
        reset in interface org.mariadb.jdbc.client.Client