Package net.sourceforge.jtds.jdbc
Class ParameterMetaDataImpl
- java.lang.Object
-
- net.sourceforge.jtds.jdbc.ParameterMetaDataImpl
-
- All Implemented Interfaces:
java.sql.ParameterMetaData,java.sql.Wrapper
public class ParameterMetaDataImpl extends java.lang.Object implements java.sql.ParameterMetaDatajTDS implementation ofParameterMetaData. For Sybase it is usually possible to obtain true parameter data for prepared statements. For Microsoft just use information determined from the actual parameters if set or return some reasonable defaults otherwise.- Version:
- $Id: ParameterMetaDataImpl.java,v 1.7.2.3 2009-12-30 08:45:34 ickzon Exp $
- Author:
- Brian Heineman, Mike Hutchinson
-
-
Field Summary
Fields Modifier and Type Field Description private intmaxPrecisionprivate ParamInfo[]parameterListprivate booleanuseLOBs
-
Constructor Summary
Constructors Constructor Description ParameterMetaDataImpl(ParamInfo[] parameterList, JtdsConnection connection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private ParamInfogetParameter(int param)java.lang.StringgetParameterClassName(int param)intgetParameterCount()intgetParameterMode(int param)intgetParameterType(int param)java.lang.StringgetParameterTypeName(int param)intgetPrecision(int param)intgetScale(int param)intisNullable(int param)booleanisSigned(int param)booleanisWrapperFor(java.lang.Class arg0)java.lang.Objectunwrap(java.lang.Class arg0)
-
-
-
Field Detail
-
parameterList
private final ParamInfo[] parameterList
-
maxPrecision
private final int maxPrecision
-
useLOBs
private final boolean useLOBs
-
-
Constructor Detail
-
ParameterMetaDataImpl
public ParameterMetaDataImpl(ParamInfo[] parameterList, JtdsConnection connection)
-
-
Method Detail
-
getParameterCount
public int getParameterCount() throws java.sql.SQLException- Specified by:
getParameterCountin interfacejava.sql.ParameterMetaData- Throws:
java.sql.SQLException
-
isNullable
public int isNullable(int param) throws java.sql.SQLException- Specified by:
isNullablein interfacejava.sql.ParameterMetaData- Throws:
java.sql.SQLException
-
getParameterType
public int getParameterType(int param) throws java.sql.SQLException- Specified by:
getParameterTypein interfacejava.sql.ParameterMetaData- Throws:
java.sql.SQLException
-
getScale
public int getScale(int param) throws java.sql.SQLException- Specified by:
getScalein interfacejava.sql.ParameterMetaData- Throws:
java.sql.SQLException
-
isSigned
public boolean isSigned(int param) throws java.sql.SQLException- Specified by:
isSignedin interfacejava.sql.ParameterMetaData- Throws:
java.sql.SQLException
-
getPrecision
public int getPrecision(int param) throws java.sql.SQLException- Specified by:
getPrecisionin interfacejava.sql.ParameterMetaData- Throws:
java.sql.SQLException
-
getParameterTypeName
public java.lang.String getParameterTypeName(int param) throws java.sql.SQLException- Specified by:
getParameterTypeNamein interfacejava.sql.ParameterMetaData- Throws:
java.sql.SQLException
-
getParameterClassName
public java.lang.String getParameterClassName(int param) throws java.sql.SQLException- Specified by:
getParameterClassNamein interfacejava.sql.ParameterMetaData- Throws:
java.sql.SQLException
-
getParameterMode
public int getParameterMode(int param) throws java.sql.SQLException- Specified by:
getParameterModein interfacejava.sql.ParameterMetaData- Throws:
java.sql.SQLException
-
getParameter
private ParamInfo getParameter(int param) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
isWrapperFor
public boolean isWrapperFor(java.lang.Class arg0) throws java.sql.SQLException- Specified by:
isWrapperForin interfacejava.sql.Wrapper- Throws:
java.sql.SQLException
-
unwrap
public java.lang.Object unwrap(java.lang.Class arg0) throws java.sql.SQLException- Specified by:
unwrapin interfacejava.sql.Wrapper- Throws:
java.sql.SQLException
-
-