com.mysql.jdbc
public class MysqlParameterMetadata extends java.lang.Object implements java.sql.ParameterMetaData
Modifier and Type | Field and Description |
---|---|
(package private) ResultSetMetaData |
metadata |
(package private) int |
parameterCount |
(package private) boolean |
returnSimpleMetadata |
Constructor and Description |
---|
MysqlParameterMetadata(Field[] fieldInfo,
int parameterCount,
ExceptionInterceptor exceptionInterceptor) |
MysqlParameterMetadata(int count)
Used for "fake" basic metadata for client-side prepared statements when
we don't know the parameter types.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getParameterClassName(int arg0) |
int |
getParameterCount() |
int |
getParameterMode(int arg0) |
int |
getParameterType(int arg0) |
java.lang.String |
getParameterTypeName(int arg0) |
int |
getPrecision(int arg0) |
int |
getScale(int arg0) |
int |
isNullable(int arg0) |
boolean |
isSigned(int arg0) |
boolean |
isWrapperFor(java.lang.Class<?> iface)
Returns true if this either implements the interface argument or is directly or indirectly a wrapper
for an object that does.
|
java.lang.Object |
unwrap(java.lang.Class<?> iface)
Returns an object that implements the given interface to allow access to non-standard methods,
or standard methods not exposed by the proxy.
|
boolean returnSimpleMetadata
ResultSetMetaData metadata
int parameterCount
MysqlParameterMetadata(Field[] fieldInfo, int parameterCount, ExceptionInterceptor exceptionInterceptor)
MysqlParameterMetadata(int count)
parameterCount
- public int getParameterCount() throws java.sql.SQLException
getParameterCount
in interface java.sql.ParameterMetaData
java.sql.SQLException
public int isNullable(int arg0) throws java.sql.SQLException
isNullable
in interface java.sql.ParameterMetaData
java.sql.SQLException
public boolean isSigned(int arg0) throws java.sql.SQLException
isSigned
in interface java.sql.ParameterMetaData
java.sql.SQLException
public int getPrecision(int arg0) throws java.sql.SQLException
getPrecision
in interface java.sql.ParameterMetaData
java.sql.SQLException
public int getScale(int arg0) throws java.sql.SQLException
getScale
in interface java.sql.ParameterMetaData
java.sql.SQLException
public int getParameterType(int arg0) throws java.sql.SQLException
getParameterType
in interface java.sql.ParameterMetaData
java.sql.SQLException
public java.lang.String getParameterTypeName(int arg0) throws java.sql.SQLException
getParameterTypeName
in interface java.sql.ParameterMetaData
java.sql.SQLException
public java.lang.String getParameterClassName(int arg0) throws java.sql.SQLException
getParameterClassName
in interface java.sql.ParameterMetaData
java.sql.SQLException
public int getParameterMode(int arg0) throws java.sql.SQLException
getParameterMode
in interface java.sql.ParameterMetaData
java.sql.SQLException
public boolean isWrapperFor(java.lang.Class<?> iface) throws java.sql.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 java.sql.Wrapper
interfaces
- a Class defining an interface.java.sql.SQLException
- if an error occurs while determining whether this is a wrapper
for an object with the given interface.public java.lang.Object unwrap(java.lang.Class<?> iface) throws java.sql.SQLException
unwrap
recursively on the wrapped object. If the receiver is not a
wrapper and does not implement the interface, then an SQLException
is thrown.iface
- A Class defining an interface that the result must implement.java.sql.SQLException
- If no object found that implements the interface