Package org.h2.jdbc
Class JdbcParameterMetaData
java.lang.Object
org.h2.message.TraceObject
org.h2.jdbc.JdbcParameterMetaData
- All Implemented Interfaces:
ParameterMetaData,Wrapper
public final class JdbcParameterMetaData
extends org.h2.message.TraceObject
implements ParameterMetaData
Information about the parameters of a prepared statement.
-
Field Summary
Fields inherited from class org.h2.message.TraceObject
ARRAY, BLOB, CALLABLE_STATEMENT, CLOB, CONNECTION, DATA_SOURCE, DATABASE_META_DATA, PARAMETER_META_DATA, PREPARED_STATEMENT, RESULT_SET, RESULT_SET_META_DATA, SAVEPOINT, SQLXML, STATEMENT, trace, XA_DATA_SOURCE, XIDFields inherited from interface java.sql.ParameterMetaData
parameterModeIn, parameterModeInOut, parameterModeOut, parameterModeUnknown, parameterNoNulls, parameterNullable, parameterNullableUnknown -
Method Summary
Modifier and TypeMethodDescriptiongetParameterClassName(int param) Returns the Java class name of the parameter.intReturns the number of parameters.intgetParameterMode(int param) Returns the parameter mode.intgetParameterType(int param) Returns the parameter type.getParameterTypeName(int param) Returns the parameter type name.intgetPrecision(int param) Returns the parameter precision.intgetScale(int param) Returns the parameter scale.intisNullable(int param) Checks if this is nullable parameter.booleanisSigned(int param) Checks if this parameter is signed.booleanisWrapperFor(Class<?> iface) Checks if unwrap can return an object of this class.toString()INTERNAL<T> TReturn an object of this class if possible.Methods inherited from class org.h2.message.TraceObject
debugCode, debugCodeAssign, debugCodeCall, debugCodeCall, debugCodeCall, getNextId, getTraceId, getTraceObjectName, isDebugEnabled, isInfoEnabled, logAndConvert, quote, quoteArray, quoteBigDecimal, quoteBytes, quoteDate, quoteIntArray, quoteMap, quoteTime, quoteTimestamp, setTrace, unsupported
-
Method Details
-
getParameterCount
Returns the number of parameters.- Specified by:
getParameterCountin interfaceParameterMetaData- Returns:
- the number
- Throws:
SQLException
-
getParameterMode
Returns the parameter mode. Always returns parameterModeIn.- Specified by:
getParameterModein interfaceParameterMetaData- Parameters:
param- the column index (1,2,...)- Returns:
- parameterModeIn
- Throws:
SQLException
-
getParameterType
Returns the parameter type. java.sql.Types.VARCHAR is returned if the data type is not known.- Specified by:
getParameterTypein interfaceParameterMetaData- Parameters:
param- the column index (1,2,...)- Returns:
- the data type
- Throws:
SQLException
-
getPrecision
Returns the parameter precision. The value 0 is returned if the precision is not known.- Specified by:
getPrecisionin interfaceParameterMetaData- Parameters:
param- the column index (1,2,...)- Returns:
- the precision
- Throws:
SQLException
-
getScale
Returns the parameter scale. The value 0 is returned if the scale is not known.- Specified by:
getScalein interfaceParameterMetaData- Parameters:
param- the column index (1,2,...)- Returns:
- the scale
- Throws:
SQLException
-
isNullable
Checks if this is nullable parameter. Returns ResultSetMetaData.columnNullableUnknown..- Specified by:
isNullablein interfaceParameterMetaData- Parameters:
param- the column index (1,2,...)- Returns:
- ResultSetMetaData.columnNullableUnknown
- Throws:
SQLException
-
isSigned
Checks if this parameter is signed. It always returns true.- Specified by:
isSignedin interfaceParameterMetaData- Parameters:
param- the column index (1,2,...)- Returns:
- true
- Throws:
SQLException
-
getParameterClassName
Returns the Java class name of the parameter. "java.lang.String" is returned if the type is not known.- Specified by:
getParameterClassNamein interfaceParameterMetaData- Parameters:
param- the column index (1,2,...)- Returns:
- the Java class name
- Throws:
SQLException
-
getParameterTypeName
Returns the parameter type name. "VARCHAR" is returned if the type is not known.- Specified by:
getParameterTypeNamein interfaceParameterMetaData- Parameters:
param- the column index (1,2,...)- Returns:
- the type name
- Throws:
SQLException
-
unwrap
Return an object of this class if possible.- Specified by:
unwrapin interfaceWrapper- Parameters:
iface- the class- Returns:
- this
- Throws:
SQLException
-
isWrapperFor
Checks if unwrap can return an object of this class.- Specified by:
isWrapperForin interfaceWrapper- Parameters:
iface- the class- Returns:
- whether or not the interface is assignable from this class
- Throws:
SQLException
-
toString
INTERNAL
-