public class FBParameterMetaData extends AbstractFieldMetaData implements FirebirdParameterMetaData
PreparedStatement
object.AbstractFieldMetaData.ExtendedFieldInfo, AbstractFieldMetaData.FieldKey
Modifier | Constructor and Description |
---|---|
protected |
FBParameterMetaData(RowDescriptor rowDescriptor,
FBConnection connection)
Creates a new
FBParameterMetaData instance. |
Modifier and Type | Method and Description |
---|---|
protected java.util.Map<AbstractFieldMetaData.FieldKey,AbstractFieldMetaData.ExtendedFieldInfo> |
getExtendedFieldInfo(FBConnection connection)
This method retrieves extended information from the system tables in
a database.
|
java.lang.String |
getParameterClassName(int parameter)
Retrieves the fully-qualified name of the Java class whose instances
should be passed to the method
PreparedStatement.setObject . |
int |
getParameterCount()
Retrieves the number of parameters in the
PreparedStatement
object for which this ParameterMetaData object contains
information. |
int |
getParameterMode(int parameter)
Retrieves the designated parameter's mode.
|
int |
getParameterType(int parameter)
Retrieves the designated parameter's SQL type.
|
java.lang.String |
getParameterTypeName(int parameter)
Retrieves the designated parameter's database-specific type name.
|
int |
getPrecision(int parameter)
Retrieves the designated parameter's specified column size.
|
int |
getScale(int parameter)
Retrieves the designated parameter's number of digits to right of the decimal point.
|
int |
isNullable(int parameter)
Retrieves whether null values are allowed in the designated parameter.
|
boolean |
isSigned(int parameter)
Retrieves whether values for the designated parameter can be signed numbers.
|
estimateFixedPrecision, getExtFieldInfo, getFieldClassName, getFieldCount, getFieldDescriptor, getFieldType, getFieldTypeName, getPrecisionInternal, getRowDescriptor, getScaleInternal, isSignedInternal, isWrapperFor, unwrap
protected FBParameterMetaData(RowDescriptor rowDescriptor, FBConnection connection) throws java.sql.SQLException
FBParameterMetaData
instance.rowDescriptor
- a row descriptorconnection
- a FBConnection
valuejava.sql.SQLException
- if an error occurspublic int getParameterCount() throws java.sql.SQLException
PreparedStatement
object for which this ParameterMetaData
object contains
information.getParameterCount
in interface java.sql.ParameterMetaData
java.sql.SQLException
- if a database access error occurspublic int isNullable(int parameter) throws java.sql.SQLException
isNullable
in interface java.sql.ParameterMetaData
parameter
- the first parameter is 1, the second is 2, ...ParameterMetaData.parameterNoNulls
,
ParameterMetaData.parameterNullable
, or
ParameterMetaData.parameterNullableUnknown
java.sql.SQLException
- if a database access error occurspublic boolean isSigned(int parameter) throws java.sql.SQLException
isSigned
in interface java.sql.ParameterMetaData
parameter
- the first parameter is 1, the second is 2, ...true
if so; false
otherwisejava.sql.SQLException
- if a database access error occurspublic int getPrecision(int parameter) throws java.sql.SQLException
The returned value represents the maximum column size for the given parameter. For numeric data, this is the maximum precision. For character data, this is the length in characters. For datetime datatypes, this is the length in characters of the String representation (assuming the maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype, this is the length in bytes. 0 is returned for data types where the column size is not applicable.
NOTE For NUMERIC
and DECIMAL
the reported precision is the maximum precision
allowed by the underlying storage data type, it is not the declared precision.
getPrecision
in interface java.sql.ParameterMetaData
parameter
- the first parameter is 1, the second is 2, ...java.sql.SQLException
- if a database access error occurspublic int getScale(int parameter) throws java.sql.SQLException
getScale
in interface java.sql.ParameterMetaData
parameter
- the first parameter is 1, the second is 2, ...java.sql.SQLException
- if a database access error occurspublic int getParameterType(int parameter) throws java.sql.SQLException
getParameterType
in interface java.sql.ParameterMetaData
parameter
- the first parameter is 1, the second is 2, ...java.sql.Types
java.sql.SQLException
- if a database access error occursTypes
public java.lang.String getParameterTypeName(int parameter) throws java.sql.SQLException
getParameterTypeName
in interface java.sql.ParameterMetaData
parameter
- the first parameter is 1, the second is 2, ...java.sql.SQLException
- if a database access error occurspublic java.lang.String getParameterClassName(int parameter) throws java.sql.SQLException
PreparedStatement.setObject
.getParameterClassName
in interface java.sql.ParameterMetaData
parameter
- the first parameter is 1, the second is 2, ...PreparedStatement.setObject
to set the value
in the specified parameter. This is the class name used
for custom mapping.java.sql.SQLException
- if a database access error occurspublic int getParameterMode(int parameter) throws java.sql.SQLException
getParameterMode
in interface java.sql.ParameterMetaData
parameter
- the first parameter is 1, the second is 2, ...ParameterMetaData.parameterModeIn
,
ParameterMetaData.parameterModeOut
, or
ParameterMetaData.parameterModeInOut
ParameterMetaData.parameterModeUnknown
.java.sql.SQLException
- if a database access error occursprotected java.util.Map<AbstractFieldMetaData.FieldKey,AbstractFieldMetaData.ExtendedFieldInfo> getExtendedFieldInfo(FBConnection connection) throws java.sql.SQLException
FBParameterMetaData
does not support extended field info, so it always returns an empty Map.
getExtendedFieldInfo
in class AbstractFieldMetaData
AbstractFieldMetaData.FieldKey
instances and AbstractFieldMetaData.ExtendedFieldInfo
instances,
or an empty Map if the metadata implementation does not support extended info.java.sql.SQLException
- if a database error occurs while obtaining extended field information.Copyright © 2001-2021 Jaybird (Firebird JDBC/JCA) team. All rights reserved.