Package org.h2.jdbc
Class JdbcResultSetMetaData
java.lang.Object
org.h2.message.TraceObject
org.h2.jdbc.JdbcResultSetMetaData
- All Implemented Interfaces:
ResultSetMetaData,Wrapper
public final class JdbcResultSetMetaData
extends org.h2.message.TraceObject
implements ResultSetMetaData
Represents the meta data for a ResultSet.
-
Field Summary
Fields inherited from class org.h2.message.TraceObject
ARRAY, BLOB, CALLABLE_STATEMENT, CLOB, CONNECTION, DATA_SOURCE, DATABASE_META_DATA, PARAMETER_META_DATA, PREPARED_STATEMENT, RESULT_SET, RESULT_SET_META_DATA, SAVEPOINT, SQLXML, STATEMENT, trace, XA_DATA_SOURCE, XIDFields inherited from interface java.sql.ResultSetMetaData
columnNoNulls, columnNullable, columnNullableUnknown -
Method Summary
Modifier and TypeMethodDescriptiongetCatalogName(int column) Returns the catalog name.getColumnClassName(int column) Gets the Java class name of the object that will be returned if ResultSet.getObject is called.intReturns the number of columns.intgetColumnDisplaySize(int column) Gets the maximum display size for this column.getColumnLabel(int column) Returns the column label.getColumnName(int column) Returns the column name.intgetColumnType(int column) Returns the data type of a column.getColumnTypeName(int column) Returns the data type name of a column.intgetPrecision(int column) Gets the precision for this column.intgetScale(int column) Gets the scale for this column.getSchemaName(int column) Returns the schema name.getTableName(int column) Returns the table name.booleanisAutoIncrement(int column) Checks if this an autoincrement column.booleanisCaseSensitive(int column) Checks if this column is case sensitive.booleanisCurrency(int column) Checks if this is a currency column.booleanisDefinitelyWritable(int column) Checks whether a write on this column will definitely succeed.intisNullable(int column) Checks if this is nullable column.booleanisReadOnly(int column) Checks if this column is read only.booleanisSearchable(int column) Checks if this column is searchable.booleanisSigned(int column) Checks if this column is signed.booleanisWrapperFor(Class<?> iface) Checks if unwrap can return an object of this class.booleanisWritable(int column) Checks whether it is possible for a write on this column to succeed.toString()INTERNAL<T> TReturn an object of this class if possible.Methods inherited from class org.h2.message.TraceObject
debugCode, debugCodeAssign, debugCodeCall, debugCodeCall, debugCodeCall, getNextId, getTraceId, getTraceObjectName, isDebugEnabled, isInfoEnabled, logAndConvert, quote, quoteArray, quoteBigDecimal, quoteBytes, quoteDate, quoteIntArray, quoteMap, quoteTime, quoteTimestamp, setTrace, unsupported
-
Method Details
-
getColumnCount
Returns the number of columns.- Specified by:
getColumnCountin interfaceResultSetMetaData- Returns:
- the number of columns
- Throws:
SQLException- if the result set is closed or invalid
-
getColumnLabel
Returns the column label.- Specified by:
getColumnLabelin interfaceResultSetMetaData- Parameters:
column- the column index (1,2,...)- Returns:
- the column label
- Throws:
SQLException- if the result set is closed or invalid
-
getColumnName
Returns the column name.- Specified by:
getColumnNamein interfaceResultSetMetaData- Parameters:
column- the column index (1,2,...)- Returns:
- the column name
- Throws:
SQLException- if the result set is closed or invalid
-
getColumnType
Returns the data type of a column. See also java.sql.Type.- Specified by:
getColumnTypein interfaceResultSetMetaData- Parameters:
column- the column index (1,2,...)- Returns:
- the data type
- Throws:
SQLException- if the result set is closed or invalid
-
getColumnTypeName
Returns the data type name of a column.- Specified by:
getColumnTypeNamein interfaceResultSetMetaData- Parameters:
column- the column index (1,2,...)- Returns:
- the data type name
- Throws:
SQLException- if the result set is closed or invalid
-
getSchemaName
Returns the schema name.- Specified by:
getSchemaNamein interfaceResultSetMetaData- Parameters:
column- the column index (1,2,...)- Returns:
- the schema name, or "" (an empty string) if not applicable
- Throws:
SQLException- if the result set is closed or invalid
-
getTableName
Returns the table name.- Specified by:
getTableNamein interfaceResultSetMetaData- Parameters:
column- the column index (1,2,...)- Returns:
- the table name
- Throws:
SQLException- if the result set is closed or invalid
-
getCatalogName
Returns the catalog name.- Specified by:
getCatalogNamein interfaceResultSetMetaData- Parameters:
column- the column index (1,2,...)- Returns:
- the catalog name
- Throws:
SQLException- if the result set is closed or invalid
-
isAutoIncrement
Checks if this an autoincrement column.- Specified by:
isAutoIncrementin interfaceResultSetMetaData- Parameters:
column- the column index (1,2,...)- Returns:
- false
- Throws:
SQLException- if the result set is closed or invalid
-
isCaseSensitive
Checks if this column is case sensitive. It always returns true.- Specified by:
isCaseSensitivein interfaceResultSetMetaData- Parameters:
column- the column index (1,2,...)- Returns:
- true
- Throws:
SQLException- if the result set is closed or invalid
-
isSearchable
Checks if this column is searchable. It always returns true.- Specified by:
isSearchablein interfaceResultSetMetaData- Parameters:
column- the column index (1,2,...)- Returns:
- true
- Throws:
SQLException- if the result set is closed or invalid
-
isCurrency
Checks if this is a currency column. It always returns false.- Specified by:
isCurrencyin interfaceResultSetMetaData- Parameters:
column- the column index (1,2,...)- Returns:
- false
- Throws:
SQLException- if the result set is closed or invalid
-
isNullable
Checks if this is nullable column. Returns ResultSetMetaData.columnNullableUnknown if this is not a column of a table. Otherwise, it returns ResultSetMetaData.columnNoNulls if the column is not nullable, and ResultSetMetaData.columnNullable if it is nullable.- Specified by:
isNullablein interfaceResultSetMetaData- Parameters:
column- the column index (1,2,...)- Returns:
- ResultSetMetaData.column*
- Throws:
SQLException- if the result set is closed or invalid
-
isSigned
Checks if this column is signed. Returns true for numeric columns.- Specified by:
isSignedin interfaceResultSetMetaData- Parameters:
column- the column index (1,2,...)- Returns:
- true for numeric columns
- Throws:
SQLException- if the result set is closed or invalid
-
isReadOnly
Checks if this column is read only. It always returns false.- Specified by:
isReadOnlyin interfaceResultSetMetaData- Parameters:
column- the column index (1,2,...)- Returns:
- false
- Throws:
SQLException- if the result set is closed or invalid
-
isWritable
Checks whether it is possible for a write on this column to succeed. It always returns true.- Specified by:
isWritablein interfaceResultSetMetaData- Parameters:
column- the column index (1,2,...)- Returns:
- true
- Throws:
SQLException- if the result set is closed or invalid
-
isDefinitelyWritable
Checks whether a write on this column will definitely succeed. It always returns false.- Specified by:
isDefinitelyWritablein interfaceResultSetMetaData- Parameters:
column- the column index (1,2,...)- Returns:
- false
- Throws:
SQLException- if the result set is closed or invalid
-
getColumnClassName
Gets the Java class name of the object that will be returned if ResultSet.getObject is called.- Specified by:
getColumnClassNamein interfaceResultSetMetaData- Parameters:
column- the column index (1,2,...)- Returns:
- the Java class name
- Throws:
SQLException- if the result set is closed or invalid
-
getPrecision
Gets the precision for this column.- Specified by:
getPrecisionin interfaceResultSetMetaData- Parameters:
column- the column index (1,2,...)- Returns:
- the precision
- Throws:
SQLException- if the result set is closed or invalid
-
getScale
Gets the scale for this column.- Specified by:
getScalein interfaceResultSetMetaData- Parameters:
column- the column index (1,2,...)- Returns:
- the scale
- Throws:
SQLException- if the result set is closed or invalid
-
getColumnDisplaySize
Gets the maximum display size for this column.- Specified by:
getColumnDisplaySizein interfaceResultSetMetaData- Parameters:
column- the column index (1,2,...)- Returns:
- the display size
- Throws:
SQLException- if the result set is closed or invalid
-
unwrap
Return an object of this class if possible.- Specified by:
unwrapin interfaceWrapper- Parameters:
iface- the class- Returns:
- this
- Throws:
SQLException
-
isWrapperFor
Checks if unwrap can return an object of this class.- Specified by:
isWrapperForin interfaceWrapper- Parameters:
iface- the class- Returns:
- whether or not the interface is assignable from this class
- Throws:
SQLException
-
toString
INTERNAL
-