Package org.firebirdsql.jdbc
Class FBResultSetMetaData
java.lang.Object
org.firebirdsql.jdbc.AbstractFieldMetaData
org.firebirdsql.jdbc.FBResultSetMetaData
- All Implemented Interfaces:
ResultSetMetaData,Wrapper,FirebirdResultSetMetaData
An object that can be used to get information about the types and properties of the columns in
a
ResultSet object.- Author:
- David Jencks, Mark Rotteveel
-
Nested Class Summary
Nested classes/interfaces inherited from class org.firebirdsql.jdbc.AbstractFieldMetaData
AbstractFieldMetaData.ExtendedFieldInfo, AbstractFieldMetaData.FieldKey -
Field Summary
Fields inherited from interface java.sql.ResultSetMetaData
columnNoNulls, columnNullable, columnNullableUnknown -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFBResultSetMetaData(RowDescriptor rowDescriptor, FBConnection connection) Creates a newFBResultSetMetaDatainstance. -
Method Summary
Modifier and TypeMethodDescriptiongetCatalogName(int column) getColumnClassName(int column) intintgetColumnDisplaySize(int column) getColumnLabel(int column) getColumnName(int column) intgetColumnType(int column) getColumnTypeName(int column) getExtendedFieldInfo(FBConnection connection) This method retrieves extended information from the system tables in a database.intgetPrecision(int column) intgetScale(int column) getSchemaName(int column) getTableAlias(int column) Gets the designated column's table alias.getTableName(int column) booleanisAutoIncrement(int column) booleanisCaseSensitive(int column) booleanisCurrency(int column) booleanisDefinitelyWritable(int column) intisNullable(int column) booleanisReadOnly(int column) booleanisSearchable(int column) booleanisSigned(int column) booleanisWritable(int column) Methods inherited from class org.firebirdsql.jdbc.AbstractFieldMetaData
estimateFixedPrecision, getExtFieldInfo, getFieldClassName, getFieldCount, getFieldDescriptor, getFieldType, getFieldTypeName, getPrecisionInternal, getRowDescriptor, getScaleInternal, isSignedInternal, isWrapperFor, unwrapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
-
Constructor Details
-
FBResultSetMetaData
protected FBResultSetMetaData(RowDescriptor rowDescriptor, FBConnection connection) throws SQLException Creates a newFBResultSetMetaDatainstance.- Parameters:
rowDescriptor- a row descriptorconnection- aFBConnectionvalue- Throws:
SQLException- if an error occurs TODO Need another constructor for metadata from constructed result set, where we supply the ext field info.
-
-
Method Details
-
getColumnCount
- Specified by:
getColumnCountin interfaceResultSetMetaData- Throws:
SQLException
-
isAutoIncrement
The current implementation always returns
false.- Specified by:
isAutoIncrementin interfaceResultSetMetaData- Throws:
SQLException
-
isCaseSensitive
The current implementation always returns
true.- Specified by:
isCaseSensitivein interfaceResultSetMetaData- Throws:
SQLException
-
isSearchable
- Specified by:
isSearchablein interfaceResultSetMetaData- Throws:
SQLException
-
isCurrency
- Specified by:
isCurrencyin interfaceResultSetMetaData- Throws:
SQLException
-
isNullable
- Specified by:
isNullablein interfaceResultSetMetaData- Throws:
SQLException
-
isSigned
- Specified by:
isSignedin interfaceResultSetMetaData- Throws:
SQLException
-
getColumnDisplaySize
- Specified by:
getColumnDisplaySizein interfaceResultSetMetaData- Throws:
SQLException
-
getColumnLabel
- Specified by:
getColumnLabelin interfaceResultSetMetaData- Throws:
SQLException
-
getColumnName
- Specified by:
getColumnNamein interfaceResultSetMetaData- Throws:
SQLException
-
getSchemaName
- Specified by:
getSchemaNamein interfaceResultSetMetaData- Returns:
- Always
""as schemas are not supported. - Throws:
SQLException
-
getPrecision
NOTE For
NUMERICandDECIMALwe attempt to retrieve the exact precision from the metadata, if this is not possible (eg the column is dynamically defined in the query), the reported precision is the maximum precision allowed by the underlying storage data type.- Specified by:
getPrecisionin interfaceResultSetMetaData- Throws:
SQLException
-
getScale
- Specified by:
getScalein interfaceResultSetMetaData- Throws:
SQLException
-
getTableName
- Specified by:
getTableNamein interfaceResultSetMetaData- Throws:
SQLException
-
getTableAlias
Description copied from interface:FirebirdResultSetMetaDataGets the designated column's table alias.- Specified by:
getTableAliasin interfaceFirebirdResultSetMetaData- Parameters:
column- the first column is 1, the second is 2, ...- Returns:
- table alias or "" if not applicable
- Throws:
SQLException- if a database access error occurs
-
getCatalogName
- Specified by:
getCatalogNamein interfaceResultSetMetaData- Returns:
- Always
""as catalogs are not supported - Throws:
SQLException
-
getColumnType
- Specified by:
getColumnTypein interfaceResultSetMetaData- Throws:
SQLException
-
getColumnTypeName
- Specified by:
getColumnTypeNamein interfaceResultSetMetaData- Throws:
SQLException
-
isReadOnly
The current implementation always returns
false, except for a DB_KEY column.- Specified by:
isReadOnlyin interfaceResultSetMetaData- Throws:
SQLException
-
isWritable
The current implementation always returns
true, except for a DB_KEY column.- Specified by:
isWritablein interfaceResultSetMetaData- Throws:
SQLException
-
isDefinitelyWritable
- Specified by:
isDefinitelyWritablein interfaceResultSetMetaData- Throws:
SQLException
-
getColumnClassName
- Specified by:
getColumnClassNamein interfaceResultSetMetaData- Throws:
SQLException
-
getExtendedFieldInfo
protected Map<AbstractFieldMetaData.FieldKey,AbstractFieldMetaData.ExtendedFieldInfo> getExtendedFieldInfo(FBConnection connection) throws SQLException Description copied from class:AbstractFieldMetaDataThis method retrieves extended information from the system tables in a database. Since this method is expensive, use it with care.- Specified by:
getExtendedFieldInfoin classAbstractFieldMetaData- Returns:
- mapping between
AbstractFieldMetaData.FieldKeyinstances andAbstractFieldMetaData.ExtendedFieldInfoinstances, or an empty Map if the metadata implementation does not support extended info. - Throws:
SQLException- if a database error occurs while obtaining extended field information.
-