public interface ParameterMetaData
An object that can be used to get information about the types and properties for each parameter marker in a PreparedStatement
object. For some queries and driver implementations, the data that would be returned by a ParameterMetaData
object may not be available until the PreparedStatement
has been executed.
Some driver implementations may not be able to provide information about the types and properties for each parameter marker in a CallableStatement
object.
static int
parameterModeIn
static int
parameterModeInOut
static int
parameterModeOut
static int
parameterModeUnknown
static int
parameterNoNulls
NULL
values. static int
parameterNullable
NULL
values. static int
parameterNullableUnknown
String
getParameterClassName(int param)
PreparedStatement.setObject
. int
getParameterCount()
PreparedStatement
object for which this ParameterMetaData
object contains information. int
getParameterMode(int param)
int
getParameterType(int param)
String
getParameterTypeName(int param)
int
getPrecision(int param)
int
getScale(int param)
int
isNullable(int param)
boolean
isSigned(int param)
static final int parameterNoNulls
NULL
values.
static final int parameterNullable
NULL
values.
static final int parameterNullableUnknown
static final int parameterModeUnknown
static final int parameterModeIn
static final int parameterModeInOut
static final int parameterModeOut
int getParameterCount() throws SQLException
PreparedStatement
object for which this ParameterMetaData
object contains information.
SQLException
- if a database access error occurs
int isNullable(int param) throws SQLException
param
- the first parameter is 1, the second is 2, ...
ParameterMetaData.parameterNoNulls
, ParameterMetaData.parameterNullable
, or ParameterMetaData.parameterNullableUnknown
SQLException
- if a database access error occurs
boolean isSigned(int param) throws SQLException
param
- the first parameter is 1, the second is 2, ...
true
if so; false
otherwise
SQLException
- if a database access error occurs
int getPrecision(int param) throws SQLException
The returned value represents the maximum column size for the given parameter. For numeric data, this is the maximum precision. For character data, this is the length in characters. For datetime datatypes, this is the length in characters of the String representation (assuming the maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype, this is the length in bytes. 0 is returned for data types where the column size is not applicable.
param
- the first parameter is 1, the second is 2, ...
SQLException
- if a database access error occurs
int getScale(int param) throws SQLException
param
- the first parameter is 1, the second is 2, ...
SQLException
- if a database access error occurs
int getParameterType(int param) throws SQLException
param
- the first parameter is 1, the second is 2, ...
java.sql.Types
SQLException
- if a database access error occurs
Types
String getParameterTypeName(int param) throws SQLException
param
- the first parameter is 1, the second is 2, ...
SQLException
- if a database access error occurs
String getParameterClassName(int param) throws SQLException
PreparedStatement.setObject
.
param
- the first parameter is 1, the second is 2, ...
PreparedStatement.setObject
to set the value in the specified parameter. This is the class name used for custom mapping.
SQLException
- if a database access error occurs
int getParameterMode(int param) throws SQLException
param
- the first parameter is 1, the second is 2, ...
ParameterMetaData.parameterModeIn
, ParameterMetaData.parameterModeOut
, or ParameterMetaData.parameterModeInOut
ParameterMetaData.parameterModeUnknown
.
SQLException
- if a database access error occurs
Copyright © 1993, 2015, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
Scripting on this page tracks web page traffic, but does not change the content in any way.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4