Package org.mariadb.jdbc
Class MariaDbParameterMetaData
- java.lang.Object
-
- org.mariadb.jdbc.MariaDbParameterMetaData
-
- All Implemented Interfaces:
java.sql.ParameterMetaData
,java.sql.Wrapper
public class MariaDbParameterMetaData extends java.lang.Object implements java.sql.ParameterMetaData
Very basic info about the parameterized query, only reliable method is getParameterCount().
-
-
Field Summary
Fields Modifier and Type Field Description private ColumnInformation[]
parametersInformation
-
Constructor Summary
Constructors Constructor Description MariaDbParameterMetaData(ColumnInformation[] parametersInformation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
checkAvailable()
java.lang.String
getParameterClassName(int param)
int
getParameterCount()
private ColumnInformation
getParameterInformation(int param)
int
getParameterMode(int param)
int
getParameterType(int param)
Parameter type are not sent by server.java.lang.String
getParameterTypeName(int param)
int
getPrecision(int param)
int
getScale(int param)
int
isNullable(int param)
boolean
isSigned(int param)
boolean
isWrapperFor(java.lang.Class<?> iface)
<T> T
unwrap(java.lang.Class<T> iface)
-
-
-
Field Detail
-
parametersInformation
private final ColumnInformation[] parametersInformation
-
-
Constructor Detail
-
MariaDbParameterMetaData
public MariaDbParameterMetaData(ColumnInformation[] parametersInformation)
-
-
Method Detail
-
checkAvailable
private void checkAvailable() throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getParameterCount
public int getParameterCount() throws java.sql.SQLException
- Specified by:
getParameterCount
in interfacejava.sql.ParameterMetaData
- Throws:
java.sql.SQLException
-
getParameterInformation
private ColumnInformation getParameterInformation(int param) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
isNullable
public int isNullable(int param) throws java.sql.SQLException
- Specified by:
isNullable
in interfacejava.sql.ParameterMetaData
- Throws:
java.sql.SQLException
-
isSigned
public boolean isSigned(int param) throws java.sql.SQLException
- Specified by:
isSigned
in interfacejava.sql.ParameterMetaData
- Throws:
java.sql.SQLException
-
getPrecision
public int getPrecision(int param) throws java.sql.SQLException
- Specified by:
getPrecision
in interfacejava.sql.ParameterMetaData
- Throws:
java.sql.SQLException
-
getScale
public int getScale(int param) throws java.sql.SQLException
- Specified by:
getScale
in interfacejava.sql.ParameterMetaData
- Throws:
java.sql.SQLException
-
getParameterType
public int getParameterType(int param) throws java.sql.SQLException
Parameter type are not sent by server. See https://jira.mariadb.org/browse/CONJ-568 and https://jira.mariadb.org/browse/MDEV-15031- Specified by:
getParameterType
in interfacejava.sql.ParameterMetaData
- Parameters:
param
- parameter number- Returns:
- SQL type from java.sql.Types
- Throws:
java.sql.SQLException
- a feature not supported, since server doesn't sent the right information
-
getParameterTypeName
public java.lang.String getParameterTypeName(int param) throws java.sql.SQLException
- Specified by:
getParameterTypeName
in interfacejava.sql.ParameterMetaData
- Throws:
java.sql.SQLException
-
getParameterClassName
public java.lang.String getParameterClassName(int param) throws java.sql.SQLException
- Specified by:
getParameterClassName
in interfacejava.sql.ParameterMetaData
- Throws:
java.sql.SQLException
-
getParameterMode
public int getParameterMode(int param)
- Specified by:
getParameterMode
in interfacejava.sql.ParameterMetaData
-
unwrap
public <T> T unwrap(java.lang.Class<T> iface) throws java.sql.SQLException
- Specified by:
unwrap
in interfacejava.sql.Wrapper
- Throws:
java.sql.SQLException
-
isWrapperFor
public boolean isWrapperFor(java.lang.Class<?> iface) throws java.sql.SQLException
- Specified by:
isWrapperFor
in interfacejava.sql.Wrapper
- Throws:
java.sql.SQLException
-
-