Class XPLAINUtil


  • public class XPLAINUtil
    extends java.lang.Object
    This class contains helper methods, which support the System Table Visitor.
    • Constructor Detail

      • XPLAINUtil

        public XPLAINUtil()
    • Method Detail

      • getYesNoCharFromBoolean

        public static java.lang.String getYesNoCharFromBoolean​(boolean test)
      • getHashKeyColumnNumberString

        public static java.lang.String getHashKeyColumnNumberString​(int[] hashKeyColumns)
      • getLockModeCode

        public static java.lang.String getLockModeCode​(java.lang.String lockString)
        util function, to resolve the lock mode, and return a lock mode code
      • getIsolationLevelCode

        public static java.lang.String getIsolationLevelCode​(java.lang.String isolationLevel)
        util function, to resolve the isolation level and return a isolation level code
      • getLockGranularityCode

        public static java.lang.String getLockGranularityCode​(java.lang.String lockString)
        util function, to resolve the lock granularity and return a lock granularity code
      • getStatementType

        public static java.lang.String getStatementType​(java.lang.String SQLText)
        This method helps to figure out the statement type and returns an appropriate return code, characterizing the stmt type.
      • extractScanProps

        public static XPLAINScanPropsDescriptor extractScanProps​(XPLAINScanPropsDescriptor descriptor,
                                                                 java.util.Properties scanProps)
        helper method which extracts the right (non-internationalzed) scan properties of the scan info properties
        Parameters:
        descriptor - the descriptor to fill with properties
        scanProps - the provided scan props
        Returns:
        the filled descriptor
      • extractSortProps

        public static XPLAINSortPropsDescriptor extractSortProps​(XPLAINSortPropsDescriptor descriptor,
                                                                 java.util.Properties sortProps)
        helper method which extracts the right (non-internationalzed) sort properties of the sort info properties object
        Parameters:
        descriptor - the descriptor to fill with properties
        sortProps - the provided sort props
        Returns:
        the filled descriptor
      • getAVGNextTime

        public static java.lang.Long getAVGNextTime​(long dividend,
                                                    long divisor)
        Compute average, avoiding divide-by-zero problems.
        Parameters:
        dividend - the long value for the dividend (the whole next time)
        divisor - the long value for the divisor (the sum of all rows seen)
        Returns:
        the quotient or null