Package org.apache.derby.diag
Class ErrorMessages
- java.lang.Object
-
- org.apache.derby.vti.VTITemplate
-
- org.apache.derby.diag.ErrorMessages
-
- All Implemented Interfaces:
java.lang.AutoCloseable,java.security.PrivilegedAction<java.io.InputStream>,java.sql.ResultSet,java.sql.Wrapper,AwareVTI,VTICosting
public final class ErrorMessages extends VTITemplate implements VTICosting, java.security.PrivilegedAction<java.io.InputStream>
ErrorMessage shows all the SQLStates, locale-sensitive error messages, and exception severities for a database.To use it, query it as follows:
SELECT* FROM NEW org.apache.derby.diag.ErrorMessages() AS EQ;
The following columns will be returned:
- SQL_STATE--VARCHAR(5) - nullable. The SQLState of the SQLException.
(The code returned by getSQLState() in SQLException.) - MESSAGE--VARCHAR(32672) - nullable. The error message
(The code returned by getMessage() in SQLException.) - SEVERITY--INTEGER - nullable. The Derby code for the severity.
(The code returned by getErrorCode() in SQLException.)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.derby.vti.VTITemplate
VTITemplate.ColumnDescriptor
-
-
Field Summary
Fields Modifier and Type Field Description private static ResultColumnDescriptor[]columnInfoprivate java.lang.Stringkprivate java.util.Enumerationkeysprivate java.lang.Stringmessageprivate static java.sql.ResultSetMetaDatametadataprivate intmsgFileprivate java.util.Propertiespprivate intseverityprivate java.lang.StringSQLState-
Fields inherited from interface java.sql.ResultSet
CLOSE_CURSORS_AT_COMMIT, CONCUR_READ_ONLY, CONCUR_UPDATABLE, FETCH_FORWARD, FETCH_REVERSE, FETCH_UNKNOWN, HOLD_CURSORS_OVER_COMMIT, TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, TYPE_SCROLL_SENSITIVE
-
Fields inherited from interface org.apache.derby.vti.VTICosting
defaultEstimatedCost, defaultEstimatedRowCount
-
-
Constructor Summary
Constructors Constructor Description ErrorMessages()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()doublegetEstimatedCostPerInstantiation(VTIEnvironment vtiEnvironment)Get the estimated cost for a single instantiation of a Table Function.doublegetEstimatedRowCount(VTIEnvironment vtiEnvironment)Get the estimated row count for a single scan of a Table Function.intgetInt(int columnIndex)java.sql.ResultSetMetaDatagetMetaData()java.lang.StringgetString(int columnIndex)private voidloadProperties()booleannext()private booleannotAnException()java.io.InputStreamrun()booleansupportsMultipleInstantiations(VTIEnvironment vtiEnvironment)Find out if the ResultSet of the Table Function can be instantiated multiple times.-
Methods inherited from class org.apache.derby.vti.VTITemplate
absolute, afterLast, beforeFirst, cancelRowUpdates, clearWarnings, deleteRow, findColumn, first, getArray, getArray, getAsciiStream, getAsciiStream, getBigDecimal, getBigDecimal, getBigDecimal, getBigDecimal, getBinaryStream, getBinaryStream, getBlob, getBlob, getBoolean, getBoolean, getByte, getByte, getBytes, getBytes, getCharacterStream, getCharacterStream, getClob, getClob, getConcurrency, getContext, getCursorName, getDate, getDate, getDate, getDate, getDouble, getDouble, getFetchDirection, getFetchSize, getFloat, getFloat, getHoldability, getInt, getLong, getLong, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getObject, getObject, getObject, getObject, getObject, getObject, getRef, getRef, getReturnTableSignature, getRow, getRowId, getRowId, getShort, getShort, getSQLXML, getSQLXML, getStatement, getString, getTime, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getTimestamp, getType, getUnicodeStream, getUnicodeStream, getURL, getURL, getWarnings, insertRow, isAfterLast, isBeforeFirst, isClosed, isFirst, isLast, isWrapperFor, last, moveToCurrentRow, moveToInsertRow, notImplemented, previous, refreshRow, relative, rowDeleted, rowInserted, rowUpdated, setContext, setFetchDirection, setFetchSize, unwrap, updateArray, updateArray, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateBigDecimal, updateBigDecimal, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBoolean, updateBoolean, updateByte, updateByte, updateBytes, updateBytes, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateClob, updateClob, updateClob, updateClob, updateDate, updateDate, updateDouble, updateDouble, updateFloat, updateFloat, updateInt, updateInt, updateLong, updateLong, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNString, updateNString, updateNull, updateNull, updateObject, updateObject, updateObject, updateObject, updateRef, updateRef, updateRow, updateRowId, updateRowId, updateShort, updateShort, updateSQLXML, updateSQLXML, updateString, updateString, updateTime, updateTime, updateTimestamp, updateTimestamp, wasNull
-
-
-
-
Field Detail
-
p
private java.util.Properties p
-
keys
private java.util.Enumeration keys
-
k
private java.lang.String k
-
SQLState
private java.lang.String SQLState
-
message
private java.lang.String message
-
severity
private int severity
-
msgFile
private int msgFile
-
columnInfo
private static final ResultColumnDescriptor[] columnInfo
-
metadata
private static final java.sql.ResultSetMetaData metadata
-
-
Method Detail
-
next
public boolean next()
- Specified by:
nextin interfacejava.sql.ResultSet- See Also:
ResultSet.next()
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.sql.ResultSet- See Also:
ResultSet.close()
-
getMetaData
public java.sql.ResultSetMetaData getMetaData()
- Specified by:
getMetaDatain interfacejava.sql.ResultSet- Overrides:
getMetaDatain classVTITemplate- See Also:
ResultSet.getMetaData()
-
getString
public java.lang.String getString(int columnIndex) throws java.sql.SQLException- Specified by:
getStringin interfacejava.sql.ResultSet- Overrides:
getStringin classVTITemplate- Throws:
java.sql.SQLException- column at index is not found- See Also:
ResultSet.getString(int)
-
getInt
public int getInt(int columnIndex) throws java.sql.SQLException- Specified by:
getIntin interfacejava.sql.ResultSet- Overrides:
getIntin classVTITemplate- Throws:
java.sql.SQLException- column at index is not found- See Also:
ResultSet.getInt(int)
-
loadProperties
private void loadProperties() throws java.io.IOException- Throws:
java.io.IOException
-
notAnException
private boolean notAnException()
-
getEstimatedRowCount
public double getEstimatedRowCount(VTIEnvironment vtiEnvironment)
Description copied from interface:VTICostingGet the estimated row count for a single scan of a Table Function.- Specified by:
getEstimatedRowCountin interfaceVTICosting- Parameters:
vtiEnvironment- The state variable for optimizing the Table Function.- Returns:
- The estimated row count for a single scan of the Table Function.
-
getEstimatedCostPerInstantiation
public double getEstimatedCostPerInstantiation(VTIEnvironment vtiEnvironment)
Description copied from interface:VTICostingGet the estimated cost for a single instantiation of a Table Function.- Specified by:
getEstimatedCostPerInstantiationin interfaceVTICosting- Parameters:
vtiEnvironment- The state variable for optimizing the Table Function.- Returns:
- The estimated cost for a single instantiation of the Table Function.
-
supportsMultipleInstantiations
public boolean supportsMultipleInstantiations(VTIEnvironment vtiEnvironment)
Description copied from interface:VTICostingFind out if the ResultSet of the Table Function can be instantiated multiple times.- Specified by:
supportsMultipleInstantiationsin interfaceVTICosting- Parameters:
vtiEnvironment- The state variable for optimizing the Table Function.- Returns:
- True if the ResultSet can be instantiated multiple times, false if can only be instantiated once.
-
run
public final java.io.InputStream run()
- Specified by:
runin interfacejava.security.PrivilegedAction<java.io.InputStream>
-
-