Class LogQueryTool


  • public class LogQueryTool
    extends Object
    • Constructor Detail

      • LogQueryTool

        public LogQueryTool​(Options options)
    • Method Detail

      • subQuery

        public String subQuery​(String sql)
        Get query, truncated if to big.
        Parameters:
        sql - current query
        Returns:
        possibly truncated query if too big
      • exceptionWithQuery

        public SQLException exceptionWithQuery​(String sql,
                                               SQLException sqlException,
                                               boolean explicitClosed)
        Return exception with query information's.
        Parameters:
        sql - current sql command
        sqlException - current exception
        explicitClosed - has connection been explicitly closed
        Returns:
        exception with query information
      • exceptionWithQuery

        public SQLException exceptionWithQuery​(ByteBuffer buffer,
                                               SQLException sqlEx,
                                               boolean explicitClosed)
        Return exception with query information's.
        Parameters:
        buffer - query buffer
        sqlEx - current exception
        explicitClosed - has connection been explicitly closed
        Returns:
        exception with query information
      • exceptionWithQuery

        public SQLException exceptionWithQuery​(ParameterHolder[] parameters,
                                               SQLException sqlEx,
                                               PrepareResult serverPrepareResult)
        Return exception with query information's.
        Parameters:
        parameters - query parameters
        sqlEx - current exception
        serverPrepareResult - prepare results
        Returns:
        exception with query information
      • exceptionWithQuery

        public SQLException exceptionWithQuery​(SQLException sqlEx,
                                               PrepareResult prepareResult)
        Return exception with query information's.
        Parameters:
        sqlEx - current exception
        prepareResult - prepare results
        Returns:
        exception with query information