Modifier and Type | Field and Description |
---|---|
static int |
parameterModeIn
常数指示参数的模式在。
|
static int |
parameterModeInOut
不断的显示参数的方式输入。
|
static int |
parameterModeOut
参数的模式是出的常数。
|
static int |
parameterModeUnknown
常数指示参数的模式未知。
|
static int |
parameterNoNulls
常表示一个参数不允许
NULL 值。
|
static int |
parameterNullable
常表示一个参数允许
NULL 值。
|
static int |
parameterNullableUnknown
不断的显示参数为空性是未知的。
|
Modifier and Type | Method and Description |
---|---|
String |
getParameterClassName(int param)
检索的java类的实例应该传递给方法
PreparedStatement.setObject 的完全限定名称。
|
int |
getParameterCount()
检索中的参数数目
PreparedStatement 对象,这个对象包含的信息
ParameterMetaData 。
|
int |
getParameterMode(int param)
检索指定的参数的模式。
|
int |
getParameterType(int param)
检索指定的SQL类型的参数。
|
String |
getParameterTypeName(int param)
检索指定参数的数据库特定类型名称。
|
int |
getPrecision(int param)
检索指定的参数指定的列大小。
|
int |
getScale(int param)
检索指定参数的数字到小数点的右边。
|
int |
isNullable(int param)
检索指定参数中是否允许空值。
|
boolean |
isSigned(int param)
检索指定参数的值是否可以符号数。
|
isWrapperFor, unwrap
static final int parameterNoNulls
NULL
值。
static final int parameterNullable
NULL
值。
static final int parameterNullableUnknown
static final int parameterModeUnknown
static final int parameterModeIn
static final int parameterModeInOut
static final int parameterModeOut
int getParameterCount() throws SQLException
PreparedStatement
对象,这个对象包含的信息
ParameterMetaData
。
SQLException
-如果一个数据库访问错误发生
int isNullable(int param) throws SQLException
param
-第一个参数是1,其次是2,…
ParameterMetaData.parameterNoNulls
,
ParameterMetaData.parameterNullable
,或
ParameterMetaData.parameterNullableUnknown
SQLException
-如果一个数据库访问错误发生
boolean isSigned(int param) throws SQLException
param
-第一个参数是1,其次是2,…
false
否则
true
;
SQLException
-如果一个数据库访问错误发生
int getPrecision(int param) throws SQLException
返回的值表示给定参数的最大列大小。对于数字数据,这是最大的精度。对于字符数据,这是字符的长度。datetime数据类型,这是在字符串表示的字符长度(假设允许的最大分数秒分量精度)。对于二进制数据,这是字节的长度。为ROWID数据类型,这是以字节为单位的长度。0返回的数据类型,列的大小不适用。
param
-第一个参数是1,其次是2,…
SQLException
-如果一个数据库访问错误发生
int getScale(int param) throws SQLException
param
-第一个参数是1,其次是2,…
SQLException
-如果一个数据库访问错误发生
int getParameterType(int param) throws SQLException
param
-第一个参数是1,其次是2,…
java.sql.Types
SQL类型
SQLException
-如果一个数据库访问错误发生
Types
String getParameterTypeName(int param) throws SQLException
param
-第一个参数是1,其次是2,…
SQLException
-如果一个数据库访问错误发生
String getParameterClassName(int param) throws SQLException
PreparedStatement.setObject
的完全限定名称。
param
-第一个参数是1,其次是2,…
PreparedStatement.setObject
用来在指定的参数设定值。这是用于自定义映射的类名称。
SQLException
-如果一个数据库访问错误发生
int getParameterMode(int param) throws SQLException
param
-第一个参数是1,其次是2,…
ParameterMetaData.parameterModeIn
,
ParameterMetaData.parameterModeOut
,或
ParameterMetaData.parameterModeInOut
ParameterMetaData.parameterModeUnknown
。
SQLException
-如果一个数据库访问错误发生
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.