public class CallableParameterMetaData extends Object implements ParameterMetaData
parameterModeIn, parameterModeInOut, parameterModeOut, parameterModeUnknown, parameterNoNulls, parameterNullable, parameterNullableUnknown| Constructor and Description |
|---|
CallableParameterMetaData(ResultSet rs,
boolean isFunction) |
| Modifier and Type | Method and Description |
|---|---|
String |
getParameterClassName(int index)
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 index)
Retrieves the designated parameter's mode.
|
String |
getParameterName(int index) |
int |
getParameterType(int index)
Retrieves the designated parameter's SQL type.
|
String |
getParameterTypeName(int index)
Retrieves the designated parameter's database-specific type name.
|
int |
getPrecision(int index)
Retrieves the designated parameter's specified column size.
|
int |
getScale(int index)
Retrieves the designated parameter's number of digits to right of the decimal point.
|
int |
isNullable(int index)
Retrieves whether null values are allowed in the designated parameter.
|
boolean |
isSigned(int index)
Retrieves whether values for the designated parameter can be signed numbers.
|
boolean |
isWrapperFor(Class<?> iface)
Returns true if this either implements the interface argument or is directly or indirectly a
wrapper for an object that does.
|
<T> T |
unwrap(Class<T> iface)
Returns an object that implements the given interface to allow access to non-standard methods,
or standard methods not exposed by the proxy.
|
public CallableParameterMetaData(ResultSet rs, boolean isFunction) throws SQLException
SQLExceptionpublic int getParameterCount()
PreparedStatement object for which this
ParameterMetaData object contains information.getParameterCount in interface ParameterMetaDatapublic int isNullable(int index)
throws SQLException
isNullable in interface ParameterMetaDataindex - 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 index)
throws SQLException
isSigned in interface ParameterMetaDataindex - the first parameter is 1, the second is 2, ...true if so; false otherwiseSQLException - if a database access error occurspublic int getPrecision(int index)
throws 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.
getPrecision in interface ParameterMetaDataindex - the first parameter is 1, the second is 2, ...SQLException - if a database access error occurspublic int getScale(int index)
throws SQLException
getScale in interface ParameterMetaDataindex - the first parameter is 1, the second is 2, ...SQLException - if a database access error occurspublic String getParameterName(int index) throws SQLException
SQLExceptionpublic int getParameterType(int index)
throws SQLException
getParameterType in interface ParameterMetaDataindex - the first parameter is 1, the second is 2, ...java.sql.TypesSQLException - if a database access error occursTypespublic String getParameterTypeName(int index) throws SQLException
getParameterTypeName in interface ParameterMetaDataindex - the first parameter is 1, the second is 2, ...SQLException - if a database access error occurspublic String getParameterClassName(int index) throws SQLException
PreparedStatement.setObject.getParameterClassName in interface ParameterMetaDataindex - 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 index)
throws SQLException
getParameterMode in interface ParameterMetaDataindex - 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 <T> T unwrap(Class<T> iface) throws SQLException
If the receiver implements the interface then the result is the receiver or a proxy for the
receiver. If the receiver is a wrapper and the wrapped object implements the interface then the
result is the wrapped object or a proxy for the wrapped object. Otherwise return the the result
of calling unwrap recursively on the wrapped object or a proxy for that result. If
the receiver is not a wrapper and does not implement the interface, then an SQLException
is thrown.
unwrap in interface Wrapperiface - A Class defining an interface that the result must implement.SQLException - If no object found that implements the interfacepublic boolean isWrapperFor(Class<?> iface) throws SQLException
isWrapperFor on the wrapped object. If this does not implement the interface and is not
a wrapper, return false. This method should be implemented as a low-cost operation compared to
unwrap so that callers can use this method to avoid expensive unwrap
calls that may fail. If this method returns true then calling unwrap with the same
argument should succeed.isWrapperFor in interface Wrapperiface - a Class defining an interface.SQLException - if an error occurs while determining whether this is a wrapper for an
object with the given interface.Copyright © 2023 SingleStore. All rights reserved.