public class ParameterMetaData extends Object implements ParameterMetaData
| 构造器和说明 |
|---|
ParameterMetaData(Parameter[] params,
PreparedStatement pstm) |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
getParameterClassName(int param)
获取 Java 类的完全限定名称
Retrieves the fully-qualified name of the Java class whose instances
should be passed to the method
PreparedStatement.setObject. |
int |
getParameterCount()
获取 PreparedStatement 对象中的参数的数量
Retrieves the number of parameters in the
PreparedStatement
object for which this ParameterMetaData object contains
information. |
int |
getParameterMode(int param)
获取指定参数的模式。
|
int |
getParameterType(int param)
获取指定参数的 SQL 类型
Retrieves the designated parameter's SQL type.
|
String |
getParameterTypeName(int param)
获取指定参数的特定于数据库的类型名称
Retrieves the designated parameter's database-specific type name.
|
int |
getPrecision(int paramNum)
获取指定参数的指定列大小
Retrieves the designated parameter's number of decimal digits.
|
int |
getScale(int paramNum)
获取指定参数的小数点右边的位数
Retrieves the designated parameter's number of digits to right of the decimal point.
|
int |
isNullable(int param)
获取是否允许在指定参数中使用 null 值
Retrieves whether null values are allowed in the designated parameter.
|
boolean |
isSigned(int paramNum)
获取指定参数的值是否可以是带符号的数字
Retrieves whether values for the designated parameter can be signed numbers.
|
boolean |
isWrapperFor(Class arg0) |
Object |
unwrap(Class arg0) |
public ParameterMetaData(Parameter[] params, PreparedStatement pstm)
public int getParameterCount()
throws SQLException
PreparedStatement
object for which this ParameterMetaData object contains
information.getParameterCount 在接口中 ParameterMetaDataSQLException - if a database access error occurspublic int isNullable(int param)
throws SQLException
isNullable 在接口中 ParameterMetaDataparam - the first parameter is 1, the second is 2, ...ParameterMetaData.parameterNoNulls,
ParameterMetaData.parameterNullable, or
ParameterMetaData.parameterNullableUnknownSQLException - if a database access error occurspublic boolean isSigned(int paramNum)
throws SQLException
isSigned 在接口中 ParameterMetaDataparamNum - the first parameter is 1, the second is 2, ...true if so; false otherwiseSQLException - if a database access error occurspublic int getPrecision(int paramNum)
throws SQLException
getPrecision 在接口中 ParameterMetaDataparamNum - the first parameter is 1, the second is 2, ...SQLException - if a database access error occurspublic int getScale(int paramNum)
throws SQLException
getScale 在接口中 ParameterMetaDataparamNum - the first parameter is 1, the second is 2, ...SQLException - if a database access error occurspublic int getParameterType(int param)
throws SQLException
getParameterType 在接口中 ParameterMetaDataparam - the first parameter is 1, the second is 2, ...java.sql.TypesSQLException - if a database access error occursTypespublic String getParameterTypeName(int param) throws SQLException
getParameterTypeName 在接口中 ParameterMetaDataparam - the first parameter is 1, the second is 2, ...SQLException - if a database access error occurspublic String getParameterClassName(int param) throws SQLException
PreparedStatement.setObject.getParameterClassName 在接口中 ParameterMetaDataparam - 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.SQLException - if a database access error occurspublic int getParameterMode(int param)
throws SQLException
getParameterMode 在接口中 ParameterMetaDataparam - the first parameter is 1, the second is 2, ...ParameterMetaData.parameterModeIn,
ParameterMetaData.parameterModeOut, or
ParameterMetaData.parameterModeInOut
ParameterMetaData.parameterModeUnknown.SQLException - if a database access error occurspublic boolean isWrapperFor(Class arg0) throws SQLException
isWrapperFor 在接口中 WrapperSQLExceptionpublic Object unwrap(Class arg0) throws SQLException
unwrap 在接口中 WrapperSQLExceptionCopyright © 2025. All rights reserved.