Class XPLAINUtil
java.lang.Object
org.apache.derby.impl.sql.execute.xplain.XPLAINUtil
This class contains helper methods, which support the System Table Visitor.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
isolation level codesstatic final String
static final String
static final String
static final String
lock granularitystatic final String
lock modesstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
the rs operator codesstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
the scan info codesstatic final String
static final String
static final String
the different statement type constantsstatic final String
sort info propertiesstatic final String
static final String
static final String
static final String
the explain type constantsstatic final String
yes no codes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic XPLAINScanPropsDescriptor
extractScanProps
(XPLAINScanPropsDescriptor descriptor, Properties scanProps) helper method which extracts the right (non-internationalzed) scan properties of the scan info propertiesstatic XPLAINSortPropsDescriptor
extractSortProps
(XPLAINSortPropsDescriptor descriptor, Properties sortProps) helper method which extracts the right (non-internationalzed) sort properties of the sort info properties objectstatic Long
getAVGNextTime
(long dividend, long divisor) Compute average, avoiding divide-by-zero problems.static String
getHashKeyColumnNumberString
(int[] hashKeyColumns) static String
getIsolationLevelCode
(String isolationLevel) util function, to resolve the isolation level and return a isolation level codestatic String
getLockGranularityCode
(String lockString) util function, to resolve the lock granularity and return a lock granularity codestatic String
getLockModeCode
(String lockString) util function, to resolve the lock mode, and return a lock mode codestatic String
getStatementType
(String SQLText) This method helps to figure out the statement type and returns an appropriate return code, characterizing the stmt type.static String
getYesNoCharFromBoolean
(boolean test)
-
Field Details
-
ISOLATION_READ_UNCOMMITED
isolation level codes- See Also:
-
ISOLATION_READ_COMMIT
- See Also:
-
ISOLATION_REPEAT_READ
- See Also:
-
ISOLATION_SERIALIZABLE
- See Also:
-
LOCK_MODE_EXCLUSIVE
lock modes- See Also:
-
LOCK_MODE_INSTANTENOUS_EXCLUSIVE
- See Also:
-
LOCK_MODE_SHARE
- See Also:
-
LOCK_MODE_INSTANTENOUS_SHARE
- See Also:
-
LOCK_GRANULARITY_TABLE
lock granularity- See Also:
-
LOCK_GRANULARITY_ROW
- See Also:
-
OP_TABLESCAN
the rs operator codes- See Also:
-
OP_INDEXSCAN
- See Also:
-
OP_HASHSCAN
- See Also:
-
OP_DISTINCTSCAN
- See Also:
-
OP_LASTINDEXKEYSCAN
- See Also:
-
OP_HASHTABLE
- See Also:
-
OP_ROWIDSCAN
- See Also:
-
OP_CONSTRAINTSCAN
- See Also:
-
OP_JOIN_NL
- See Also:
-
OP_JOIN_HASH
- See Also:
-
OP_JOIN_NL_LO
- See Also:
-
OP_JOIN_HASH_LO
- See Also:
-
OP_UNION
- See Also:
-
OP_SET
- See Also:
-
OP_SET_INTERSECT
- See Also:
-
OP_SET_EXCEPT
- See Also:
-
OP_INSERT
- See Also:
-
OP_UPDATE
- See Also:
-
OP_DELETE
- See Also:
-
OP_CASCADE
- See Also:
-
OP_VTI
- See Also:
-
OP_BULK
- See Also:
-
OP_DISTINCT
- See Also:
-
OP_NORMALIZE
- See Also:
-
OP_ANY
- See Also:
-
OP_SCROLL
- See Also:
-
OP_MATERIALIZE
- See Also:
-
OP_ONCE
- See Also:
-
OP_VTI_RS
- See Also:
-
OP_ROW
- See Also:
-
OP_PROJECT
- See Also:
-
OP_FILTER
- See Also:
-
OP_AGGREGATE
- See Also:
-
OP_PROJ_RESTRICT
- See Also:
-
OP_SORT
- See Also:
-
OP_GROUP
- See Also:
-
OP_CURRENT_OF
- See Also:
-
OP_ROW_COUNT
- See Also:
-
OP_WINDOW
- See Also:
-
SCAN_HEAP
the scan info codes- See Also:
-
SCAN_BTREE
- See Also:
-
SCAN_SORT
- See Also:
-
SCAN_BITSET_ALL
- See Also:
-
SELECT_STMT_TYPE
the different statement type constants- See Also:
-
SELECT_APPROXIMATE_STMT_TYPE
- See Also:
-
INSERT_STMT_TYPE
- See Also:
-
UPDATE_STMT_TYPE
- See Also:
-
DELETE_STMT_TYPE
- See Also:
-
CALL_STMT_TYPE
- See Also:
-
DDL_STMT_TYPE
- See Also:
-
XPLAIN_ONLY
the explain type constants- See Also:
-
XPLAIN_FULL
- See Also:
-
SORT_EXTERNAL
sort info properties- See Also:
-
SORT_INTERNAL
- See Also:
-
YES_CODE
yes no codes- See Also:
-
NO_CODE
- See Also:
-
-
Constructor Details
-
XPLAINUtil
public XPLAINUtil()
-
-
Method Details
-
getYesNoCharFromBoolean
-
getHashKeyColumnNumberString
-
getLockModeCode
util function, to resolve the lock mode, and return a lock mode code -
getIsolationLevelCode
util function, to resolve the isolation level and return a isolation level code -
getLockGranularityCode
util function, to resolve the lock granularity and return a lock granularity code -
getStatementType
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, Properties scanProps) helper method which extracts the right (non-internationalzed) scan properties of the scan info properties- Parameters:
descriptor
- the descriptor to fill with propertiesscanProps
- the provided scan props- Returns:
- the filled descriptor
-
extractSortProps
public static XPLAINSortPropsDescriptor extractSortProps(XPLAINSortPropsDescriptor descriptor, 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 propertiessortProps
- the provided sort props- Returns:
- the filled descriptor
-
getAVGNextTime
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
-