We take the (Derby) ResultDescription and examine it, to return the appropriate information.
This class can be used outside of this package to convert a ResultDescription into a ResultSetMetaData object.
EmbedResultSetMetaData objects are shared across multiple threads by being stored in the ResultDescription for a compiled plan. If the required api for ResultSetMetaData ever changes so that it has a close() method, a getConnection() method or any other Connection or ResultSet specific method then this sharing must be removed.
| Modifier and Type | Field and Description |
|---|---|
| private final ResultColumnDescriptor[] |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final String | Returns: column name or "" if not applicable.the first column is 1, the second is 2, ... column)Implements java. What's a column's table's catalog name? |
| public final String | getColumnClassName(int
the first column is 1, the second is 2, ... column)Implements java. JDBC 2.0 Return the fully qualified name of the Java class whose instances are manufactured if ResultSet.getObject() is called to retrieve a value from the column. |
| public final int | Returns: the numberImplements java. What's the number of columns in the ResultSet? |
| public final int | Returns: max widththe first column is 1, the second is 2, ... column)Implements java. What's the column's normal max width in chars? |
| public final String | Returns: true if sothe first column is 1, the second is 2, ... column)Implements java. What's the suggested column title for use in printouts and displays? |
| public final String | Returns: column namethe first column is 1, the second is 2, ... column)Implements java. What's a column's name? |
| public final int | Returns: SQL typethe first column is 1, the second is 2, ... column)Implements java. What's a column's SQL type? |
| private DataTypeDescriptor | |
| public final String | Returns: type namethe first column is 1, the second is 2, ... column)Implements java. What's a column's data source specific type name? |
| public final int | Returns: precisionthe first column is 1, the second is 2, ... column)Implements java. What's a column's number of decimal digits? |
| public static ResultColumnDescriptor | |
| public static ResultColumnDescriptor | |
| public static ResultColumnDescriptor | |
| public final int | Returns: scalethe first column is 1, the second is 2, ... column)Implements java. What's a column's number of digits to right of the decimal point? |
| public final String | Returns: schema name or "" if not applicablethe first column is 1, the second is 2, ... column)Implements java. What's a column's table's schema? |
| public final String | Returns: table name or "" if not applicablethe first column is 1, the second is 2, ... column)Implements java. What's a column's table name? |
| public final boolean | Returns: true if sothe first column is 1, the second is 2, ... column)Implements java. Is the column automatically numbered, thus read-only? |
| public final boolean | Returns: true if sothe first column is 1, the second is 2, ... column)Implements java. Does a column's case matter? |
| public final boolean | Returns: false, alwaysthe first column is 1, the second is 2, ... column)Implements java. Is the column a cash value? |
| public final boolean | Returns: true if sothe first column is 1, the second is 2, ... column)Implements java. Will a write on the column definitely succeed? |
| public final int | Returns: columnNoNulls, columnNullable or columnNullableUnknownthe first column is 1, the second is 2, ... column)Implements java. Can you put a NULL in this column? |
| public final boolean | Returns: true if sothe first column is 1, the second is 2, ... column)Implements java. Is a column definitely not writable? |
| public final boolean | Returns: true if sothe first column is 1, the second is 2, ... column)Implements java. Can the column be used in a where clause? |
| public final boolean | Returns: true if sothe first column is 1, the second is 2, ... column)Implements java. Is the column a signed number? |
| public final boolean | Returns: true if this implements the interfacethe interface to check for iface)Implements java. Returns whether or not this instance implements the specified interface. |
| public final boolean | Returns: true if sothe first column is 1, the second is 2, ... column)Implements java. Is it possible for a write on the column to succeed? |
| public final <T> T | Returns: an object that implements the interfacethe interface iface)Implements java. Returns |
| private void |
| columnInfo | back to summary |
|---|---|
| private final ResultColumnDescriptor[] columnInfo | |
| EmbedResultSetMetaData | back to summary |
|---|---|
| public EmbedResultSetMetaData(ResultColumnDescriptor[] columnInfo) | |
| getCatalogName | back to summary |
|---|---|
| public final String getCatalogName(int column) throws SQLException Implements java. What's a column's table's catalog name?
| |
| getColumnClassName | back to summary |
|---|---|
| public final String getColumnClassName(int column) throws SQLException Implements java. JDBC 2.0 Return the fully qualified name of the Java class whose instances are manufactured if ResultSet.getObject() is called to retrieve a value from the column. ResultSet.getObject() may return a subClass of the class returned by this method.
| |
| getColumnCount | back to summary |
|---|---|
| public final int getColumnCount() Implements java. What's the number of columns in the ResultSet?
| |
| getColumnDisplaySize | back to summary |
|---|---|
| public final int getColumnDisplaySize(int column) throws SQLException Implements java. What's the column's normal max width in chars?
| |
| getColumnLabel | back to summary |
|---|---|
| public final String getColumnLabel(int column) throws SQLException Implements java. What's the suggested column title for use in printouts and displays?
| |
| getColumnName | back to summary |
|---|---|
| public final String getColumnName(int column) throws SQLException Implements java. What's a column's name?
| |
| getColumnType | back to summary |
|---|---|
| public final int getColumnType(int column) throws SQLException Implements java. What's a column's SQL type?
| |
| getColumnTypeDescriptor | back to summary |
|---|---|
| private DataTypeDescriptor getColumnTypeDescriptor(int column) throws SQLException | |
| getColumnTypeName | back to summary |
|---|---|
| public final String getColumnTypeName(int column) throws SQLException Implements java. What's a column's data source specific type name?
| |
| getPrecision | back to summary |
|---|---|
| public final int getPrecision(int column) throws SQLException Implements java. What's a column's number of decimal digits?
| |
| getResultColumnDescriptor | back to summary |
|---|---|
| public static ResultColumnDescriptor getResultColumnDescriptor(String name, int jdcbTypeId, boolean nullable) | |
| getResultColumnDescriptor | back to summary |
|---|---|
| public static ResultColumnDescriptor getResultColumnDescriptor(String name, int jdcbTypeId, boolean nullable, int length) | |
| getResultColumnDescriptor | back to summary |
|---|---|
| public static ResultColumnDescriptor getResultColumnDescriptor(String name, DataTypeDescriptor dtd) | |
| getScale | back to summary |
|---|---|
| public final int getScale(int column) throws SQLException Implements java. What's a column's number of digits to right of the decimal point?
| |
| getSchemaName | back to summary |
|---|---|
| public final String getSchemaName(int column) throws SQLException Implements java. What's a column's table's schema?
| |
| getTableName | back to summary |
|---|---|
| public final String getTableName(int column) throws SQLException Implements java. What's a column's table name?
| |
| isAutoIncrement | back to summary |
|---|---|
| public final boolean isAutoIncrement(int column) throws SQLException Implements java. Is the column automatically numbered, thus read-only?
| |
| isCaseSensitive | back to summary |
|---|---|
| public final boolean isCaseSensitive(int column) throws SQLException Implements java. Does a column's case matter?
| |
| isCurrency | back to summary |
|---|---|
| public final boolean isCurrency(int column) throws SQLException Implements java. Is the column a cash value? Always returns false since there are no currency data types in Derby.
| |
| isDefinitelyWritable | back to summary |
|---|---|
| public final boolean isDefinitelyWritable(int column) throws SQLException Implements java. Will a write on the column definitely succeed?
| |
| isNullable | back to summary |
|---|---|
| public final int isNullable(int column) throws SQLException Implements java. Can you put a NULL in this column?
| |
| isReadOnly | back to summary |
|---|---|
| public final boolean isReadOnly(int column) throws SQLException Implements java. Is a column definitely not writable?
| |
| isSearchable | back to summary |
|---|---|
| public final boolean isSearchable(int column) throws SQLException Implements java. Can the column be used in a where clause?
| |
| isSigned | back to summary |
|---|---|
| public final boolean isSigned(int column) throws SQLException Implements java. Is the column a signed number?
| |
| isWrapperFor | back to summary |
|---|---|
| public final boolean isWrapperFor(Class<?> iface) Implements java. Returns whether or not this instance implements the specified interface.
| |
| isWritable | back to summary |
|---|---|
| public final boolean isWritable(int column) throws SQLException Implements java. Is it possible for a write on the column to succeed?
| |
| unwrap | back to summary |
|---|---|
| public final <T> T unwrap(Class<T> iface) throws SQLException Implements java. Returns
| |
| validColumnNumber | back to summary |
|---|---|
| private void validColumnNumber(int column) throws SQLException | |