java.sql.ParameterMetaData |
An interface used to get information about the types and properties of
parameters in a PreparedStatement
.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | parameterModeIn | Indicates that the parameter mode is IN . |
|||||||||
int | parameterModeInOut | Indicates that the parameter mode is INOUT . |
|||||||||
int | parameterModeOut | Indicates that the parameter mode is OUT . |
|||||||||
int | parameterModeUnknown | Indicates that the parameter mode is not known. | |||||||||
int | parameterNoNulls | Indicates that a parameter is not permitted to be NULL . |
|||||||||
int | parameterNullable | Indicates that a parameter is permitted to be NULL . |
|||||||||
int | parameterNullableUnknown | Indicates that whether a parameter is allowed to be null or not
is not known. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Gets the fully-qualified name of the Java class which should be passed as
a parameter to the method
PreparedStatement.setObject . | |||||||||||
Gets the number of parameters in the
PreparedStatement for which
this ParameterMetaData contains information. | |||||||||||
Gets the mode of the specified parameter.
| |||||||||||
Gets the SQL type of a specified parameter.
| |||||||||||
Gets the database-specific type name of a specified parameter.
| |||||||||||
Gets the number of decimal digits for a specified parameter.
| |||||||||||
Gets the number of digits after the decimal point for a specified
parameter.
| |||||||||||
Gets whether
null values are allowed for the specified parameter. | |||||||||||
Gets whether values for the specified parameter can be signed numbers.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
java.sql.Wrapper
|
Indicates that the parameter mode is IN
.
Indicates that the parameter mode is INOUT
.
Indicates that the parameter mode is OUT
.
Indicates that the parameter mode is not known.
Indicates that a parameter is not permitted to be NULL
.
Indicates that a parameter is permitted to be NULL
.
Indicates that whether a parameter is allowed to be null
or not
is not known.
Gets the fully-qualified name of the Java class which should be passed as
a parameter to the method PreparedStatement.setObject
.
paramIndex | the index number of the parameter, where the first parameter has index 1. |
---|
SQLException | if a database error happens. |
---|
Gets the number of parameters in the PreparedStatement
for which
this ParameterMetaData
contains information.
SQLException | if a database error happens. |
---|
Gets the mode of the specified parameter. Can be one of:
paramIndex | the index number of the parameter, where the first parameter has index 1. |
---|
SQLException | if a database error happens. |
---|
Gets the SQL type of a specified parameter.
paramIndex | the index number of the parameter, where the first parameter has index 1. |
---|
java.sql.Types
.SQLException | if a database error happens. |
---|
Gets the database-specific type name of a specified parameter.
paramIndex | the index number of the parameter, where the first parameter has index 1. |
---|
SQLException | if a database error happens. |
---|
Gets the number of decimal digits for a specified parameter.
paramIndex | the index number of the parameter, where the first parameter has index 1. |
---|
0
if the parameter is not a numeric type.SQLException | if a database error happens. |
---|
Gets the number of digits after the decimal point for a specified parameter.
paramIndex | the index number of the parameter, where the first parameter has index 1. |
---|
0
if the parameter is not a numeric type.SQLException | if a database error happens. |
---|
Gets whether null
values are allowed for the specified parameter.
The returned value is one of:
paramIndex | the index number of the parameter, where the first parameter has index 1. |
---|
SQLException | if a database error is encountered. |
---|
Gets whether values for the specified parameter can be signed numbers.
paramIndex | the index number of the parameter, where the first parameter has index 1. |
---|
true
if values can be signed numbers for this parameter,
false
otherwise.SQLException | if a database error happens. |
---|