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 Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringisolation level codesstatic final Stringstatic final Stringstatic final Stringstatic final Stringlock granularitystatic final Stringlock modesstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringthe rs operator codesstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringthe scan info codesstatic final Stringstatic final Stringstatic final Stringthe different statement type constantsstatic final Stringsort info propertiesstatic final Stringstatic final Stringstatic final Stringstatic final Stringthe explain type constantsstatic final Stringyes no codes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic XPLAINScanPropsDescriptorextractScanProps(XPLAINScanPropsDescriptor descriptor, Properties scanProps) helper method which extracts the right (non-internationalzed) scan properties of the scan info propertiesstatic XPLAINSortPropsDescriptorextractSortProps(XPLAINSortPropsDescriptor descriptor, Properties sortProps) helper method which extracts the right (non-internationalzed) sort properties of the sort info properties objectstatic LonggetAVGNextTime(long dividend, long divisor) Compute average, avoiding divide-by-zero problems.static StringgetHashKeyColumnNumberString(int[] hashKeyColumns) static StringgetIsolationLevelCode(String isolationLevel) util function, to resolve the isolation level and return a isolation level codestatic StringgetLockGranularityCode(String lockString) util function, to resolve the lock granularity and return a lock granularity codestatic StringgetLockModeCode(String lockString) util function, to resolve the lock mode, and return a lock mode codestatic StringgetStatementType(String SQLText) This method helps to figure out the statement type and returns an appropriate return code, characterizing the stmt type.static StringgetYesNoCharFromBoolean(boolean test)
-
Field Details
-
ISOLATION_READ_UNCOMMITED
-
ISOLATION_READ_COMMIT
- See Also:
-
ISOLATION_REPEAT_READ
- See Also:
-
ISOLATION_SERIALIZABLE
- See Also:
-
LOCK_MODE_EXCLUSIVE
-
LOCK_MODE_INSTANTENOUS_EXCLUSIVE
- See Also:
-
LOCK_MODE_SHARE
- See Also:
-
LOCK_MODE_INSTANTENOUS_SHARE
- See Also:
-
LOCK_GRANULARITY_TABLE
-
LOCK_GRANULARITY_ROW
- See Also:
-
OP_TABLESCAN
-
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
-
SCAN_BTREE
- See Also:
-
SCAN_SORT
- See Also:
-
SCAN_BITSET_ALL
- See Also:
-
SELECT_STMT_TYPE
-
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
-
XPLAIN_FULL
- See Also:
-
SORT_EXTERNAL
-
SORT_INTERNAL
- See Also:
-
YES_CODE
-
NO_CODE
- See Also:
-
-
Constructor Details
-
XPLAINUtil
public XPLAINUtil()
-
-
Method Details
-
getYesNoCharFromBoolean
-
getHashKeyColumnNumberString
-
getLockModeCode
-
getIsolationLevelCode
-
getLockGranularityCode
-
getStatementType
-
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
-