com.mysql.jdbc
Class MysqlParameterMetadata
java.lang.Object
com.mysql.jdbc.MysqlParameterMetadata
- All Implemented Interfaces:
- java.sql.ParameterMetaData, java.sql.Wrapper
public class MysqlParameterMetadata
- extends java.lang.Object
- implements java.sql.ParameterMetaData
Fields inherited from interface java.sql.ParameterMetaData |
parameterModeIn, parameterModeInOut, parameterModeOut, parameterModeUnknown, parameterNoNulls, parameterNullable, parameterNullableUnknown |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
returnSimpleMetadata
boolean returnSimpleMetadata
metadata
ResultSetMetaData metadata
parameterCount
int parameterCount
MysqlParameterMetadata
MysqlParameterMetadata(Field[] fieldInfo,
int parameterCount,
ExceptionInterceptor exceptionInterceptor)
MysqlParameterMetadata
MysqlParameterMetadata(int count)
- Used for "fake" basic metadata for client-side prepared statements when
we don't know the parameter types.
- Parameters:
parameterCount
-
getParameterCount
public int getParameterCount()
throws java.sql.SQLException
- Specified by:
getParameterCount
in interface java.sql.ParameterMetaData
- Throws:
java.sql.SQLException
isNullable
public int isNullable(int arg0)
throws java.sql.SQLException
- Specified by:
isNullable
in interface java.sql.ParameterMetaData
- Throws:
java.sql.SQLException
isSigned
public boolean isSigned(int arg0)
throws java.sql.SQLException
- Specified by:
isSigned
in interface java.sql.ParameterMetaData
- Throws:
java.sql.SQLException
getPrecision
public int getPrecision(int arg0)
throws java.sql.SQLException
- Specified by:
getPrecision
in interface java.sql.ParameterMetaData
- Throws:
java.sql.SQLException
getScale
public int getScale(int arg0)
throws java.sql.SQLException
- Specified by:
getScale
in interface java.sql.ParameterMetaData
- Throws:
java.sql.SQLException
getParameterType
public int getParameterType(int arg0)
throws java.sql.SQLException
- Specified by:
getParameterType
in interface java.sql.ParameterMetaData
- Throws:
java.sql.SQLException
getParameterTypeName
public java.lang.String getParameterTypeName(int arg0)
throws java.sql.SQLException
- Specified by:
getParameterTypeName
in interface java.sql.ParameterMetaData
- Throws:
java.sql.SQLException
getParameterClassName
public java.lang.String getParameterClassName(int arg0)
throws java.sql.SQLException
- Specified by:
getParameterClassName
in interface java.sql.ParameterMetaData
- Throws:
java.sql.SQLException
getParameterMode
public int getParameterMode(int arg0)
throws java.sql.SQLException
- Specified by:
getParameterMode
in interface java.sql.ParameterMetaData
- Throws:
java.sql.SQLException
isWrapperFor
public boolean isWrapperFor(java.lang.Class iface)
throws java.sql.SQLException
- Returns true if this either implements the interface argument or is directly or indirectly a wrapper
for an object that does. Returns false otherwise. If this implements the interface then return true,
else if this is a wrapper then return the result of recursively calling
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.
- Specified by:
isWrapperFor
in interface java.sql.Wrapper
- Parameters:
interfaces
- a Class defining an interface.
- Returns:
- true if this implements the interface or directly or indirectly wraps an object that does.
- Throws:
java.sql.SQLException
- if an error occurs while determining whether this is a wrapper
for an object with the given interface.- Since:
- 1.6
unwrap
public java.lang.Object unwrap(java.lang.Class iface)
throws java.sql.SQLException
- Returns an object that implements the given interface to allow access to non-standard methods,
or standard methods not exposed by the proxy.
The result may be either the object found to implement the interface or a proxy for that object.
If the receiver implements the interface then that is the object. If the receiver is a wrapper
and the wrapped object implements the interface then that is the object. Otherwise the object is
the result of calling
unwrap
recursively on the wrapped object. If the receiver is not a
wrapper and does not implement the interface, then an SQLException
is thrown.
- Specified by:
unwrap
in interface java.sql.Wrapper
- Parameters:
iface
- A Class defining an interface that the result must implement.
- Returns:
- an object that implements the interface. May be a proxy for the actual implementing object.
- Throws:
java.sql.SQLException
- If no object found that implements the interface- Since:
- 1.6