java.lang.Object
org.firebirdsql.jdbc.AbstractFieldMetaData
org.firebirdsql.jdbc.FBResultSetMetaData
- All Implemented Interfaces:
ResultSetMetaData
,Wrapper
,FirebirdResultSetMetaData
@InternalApi
public class FBResultSetMetaData
extends AbstractFieldMetaData
implements FirebirdResultSetMetaData
Information about the types and properties of the columns in a
ResultSet
object.
This class is internal API of Jaybird. Future versions may radically change, move, or make inaccessible this type.
For the public API, refer to the ResultSetMetaData
and FirebirdResultSetMetaData
interfaces.
- 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
ConstructorsModifierConstructorDescriptionprotected
FBResultSetMetaData
(RowDescriptor rowDescriptor, FBConnection connection) Creates a newFBResultSetMetaData
instance. -
Method Summary
Modifier and TypeMethodDescriptiongetCatalogName
(int column) getColumnClassName
(int column) int
int
getColumnDisplaySize
(int column) getColumnLabel
(int column) getColumnName
(int column) int
getColumnType
(int column) getColumnTypeName
(int column) getExtendedFieldInfo
(FBConnection connection) This method retrieves extended information from the system tables in a database.int
getPrecision
(int column) int
getScale
(int column) getSchemaName
(int column) getTableAlias
(int column) Gets the designated column's table alias.getTableName
(int column) boolean
isAutoIncrement
(int column) boolean
isCaseSensitive
(int column) boolean
isCurrency
(int column) boolean
isDefinitelyWritable
(int column) int
isNullable
(int column) boolean
isReadOnly
(int column) boolean
isSearchable
(int column) boolean
isSigned
(int column) boolean
isWritable
(int column) Methods inherited from class org.firebirdsql.jdbc.AbstractFieldMetaData
estimateFixedPrecision, getExtFieldInfo, getFieldClassName, getFieldCount, getFieldDescriptor, getFieldType, getFieldTypeName, getPrecisionInternal, getRowDescriptor, getScaleInternal, isSignedInternal, isWrapperFor, unwrap
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
-
Constructor Details
-
FBResultSetMetaData
protected FBResultSetMetaData(RowDescriptor rowDescriptor, FBConnection connection) throws SQLException Creates a newFBResultSetMetaData
instance.- Parameters:
rowDescriptor
- a row descriptorconnection
- aFBConnection
value- Throws:
SQLException
- if an error occurs
-
-
Method Details
-
getColumnCount
- Specified by:
getColumnCount
in interfaceResultSetMetaData
- Throws:
SQLException
-
isAutoIncrement
- Specified by:
isAutoIncrement
in interfaceResultSetMetaData
- Throws:
SQLException
-
isCaseSensitive
The current implementation always returns
true
.- Specified by:
isCaseSensitive
in interfaceResultSetMetaData
- Throws:
SQLException
-
isSearchable
- Specified by:
isSearchable
in interfaceResultSetMetaData
- Throws:
SQLException
-
isCurrency
- Specified by:
isCurrency
in interfaceResultSetMetaData
- Throws:
SQLException
-
isNullable
- Specified by:
isNullable
in interfaceResultSetMetaData
- Throws:
SQLException
-
isSigned
- Specified by:
isSigned
in interfaceResultSetMetaData
- Throws:
SQLException
-
getColumnDisplaySize
- Specified by:
getColumnDisplaySize
in interfaceResultSetMetaData
- Throws:
SQLException
-
getColumnLabel
- Specified by:
getColumnLabel
in interfaceResultSetMetaData
- Throws:
SQLException
-
getColumnName
- Specified by:
getColumnName
in interfaceResultSetMetaData
- Throws:
SQLException
-
getSchemaName
- Specified by:
getSchemaName
in interfaceResultSetMetaData
- Returns:
- Always
""
as schemas are not supported. - Throws:
SQLException
-
getPrecision
NOTE For
NUMERIC
andDECIMAL
we 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:
getPrecision
in interfaceResultSetMetaData
- Throws:
SQLException
-
getScale
- Specified by:
getScale
in interfaceResultSetMetaData
- Throws:
SQLException
-
getTableName
- Specified by:
getTableName
in interfaceResultSetMetaData
- Throws:
SQLException
-
getTableAlias
Description copied from interface:FirebirdResultSetMetaData
Gets the designated column's table alias.- Specified by:
getTableAlias
in 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:
getCatalogName
in interfaceResultSetMetaData
- Returns:
- Always
""
as catalogs are not supported - Throws:
SQLException
-
getColumnType
- Specified by:
getColumnType
in interfaceResultSetMetaData
- Throws:
SQLException
-
getColumnTypeName
- Specified by:
getColumnTypeName
in interfaceResultSetMetaData
- Throws:
SQLException
-
isReadOnly
The current implementation always returns
false
, except for a DB_KEY column.- Specified by:
isReadOnly
in interfaceResultSetMetaData
- Throws:
SQLException
-
isWritable
The current implementation always returns
true
, except for a DB_KEY column.- Specified by:
isWritable
in interfaceResultSetMetaData
- Throws:
SQLException
-
isDefinitelyWritable
- Specified by:
isDefinitelyWritable
in interfaceResultSetMetaData
- Throws:
SQLException
-
getColumnClassName
- Specified by:
getColumnClassName
in interfaceResultSetMetaData
- Throws:
SQLException
-
getExtendedFieldInfo
protected Map<AbstractFieldMetaData.FieldKey,AbstractFieldMetaData.ExtendedFieldInfo> getExtendedFieldInfo(FBConnection connection) throws SQLException Description copied from class:AbstractFieldMetaData
This method retrieves extended information from the system tables in a database. Since this method is expensive, use it with care.- Specified by:
getExtendedFieldInfo
in classAbstractFieldMetaData
- Returns:
- mapping between
AbstractFieldMetaData.FieldKey
instances andAbstractFieldMetaData.ExtendedFieldInfo
instances, 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.
-