postgresql-42.2.5.jar
登录
|
org.postgresql:postgresql:42.2.5
META-INF
org
postgresql
core
ds
geometric
jdbc
EscapedFunctions2.java
FieldMetadata.java
PgConnection.java
PreferQueryMode.java
PgStatement.java
PSQLSavepoint.java
CallableBatchResultHandler.java
PgResultSetMetaData.java
SslMode.java
TypeInfoCache.java
UUIDArrayAssistant.java
PgDatabaseMetaData.java
PgResultSet.java
PrimitiveArraySupport.java
StatementCancelState.java
PgParameterMetaData.java
ResultWrapper.java
TimestampUtils.java
AbstractBlobClob.java
PgClob.java
PSQLWarningWrapper.java
AutoSave.java
PgBlob.java
BooleanTypeUtil.java
PgArray.java
BatchResultHandler.java
PgPreparedStatement.java
PgCallableStatement.java
EscapedFunctions.java
PgSQLXML.java
replication
Driver.java
largeobject
PGStatement.java
PGResultSetMetaData.java
gss
util
PGRefCursorResultSet.java
osgi
ssl
PGConnection.java
jdbc3
PGNotification.java
sspi
fastpath
copy
translation
hostchooser
jdbc2
PGProperty.java
xa
jre8
PgParameterMetaData.java
清空
类结构
/* * Copyright (c) 2004, PostgreSQL Global Development Group * See the LICENSE file in the project root for more information. */ package org.postgresql.jdbc; import org.postgresql.core.
BaseConnection
; import org.postgresql.util.
GT
; import org.postgresql.util.
PSQLException
; import org.postgresql.util.
PSQLState
; import java.sql.
ParameterMetaData
; import java.sql.
SQLException
; public class
PgParameterMetaData
implements
ParameterMetaData
{ private final
BaseConnection
_connection
; private final int[]
_oids
; public
PgParameterMetaData
(
BaseConnection
connection
, int[]
oids
) {
_connection
=
connection
;
_oids
=
oids
; } public
String
getParameterClassName
(int
param
) throws
SQLException
{
checkParamIndex
(
param
); return
_connection
.
getTypeInfo
().
getJavaClass
(
_oids
[
param
- 1]); } public int
getParameterCount
() { return
_oids
.length; } /** * {@inheritDoc} For now report all parameters as inputs. CallableStatements may have one output, * but ignore that for now. */ public int
getParameterMode
(int
param
) throws
SQLException
{
checkParamIndex
(
param
); return
ParameterMetaData
.
parameterModeIn
; } public int
getParameterType
(int
param
) throws
SQLException
{
checkParamIndex
(
param
); return
_connection
.
getTypeInfo
().
getSQLType
(
_oids
[
param
- 1]); } public
String
getParameterTypeName
(int
param
) throws
SQLException
{
checkParamIndex
(
param
); return
_connection
.
getTypeInfo
().
getPGType
(
_oids
[
param
- 1]); } // we don't know this public int
getPrecision
(int
param
) throws
SQLException
{
checkParamIndex
(
param
); return 0; } // we don't know this public int
getScale
(int
param
) throws
SQLException
{
checkParamIndex
(
param
); return 0; } // we can't tell anything about nullability public int
isNullable
(int
param
) throws
SQLException
{
checkParamIndex
(
param
); return
ParameterMetaData
.
parameterNullableUnknown
; } /** * {@inheritDoc} PostgreSQL doesn't have unsigned numbers */ public boolean
isSigned
(int
param
) throws
SQLException
{
checkParamIndex
(
param
); return
_connection
.
getTypeInfo
().
isSigned
(
_oids
[
param
- 1]); } private void
checkParamIndex
(int
param
) throws
PSQLException
{ if (
param
< 1 ||
param
>
_oids
.length) { throw new
PSQLException
(
GT
.
tr
("The parameter index is out of range: {0}, number of parameters: {1}.",
param
,
_oids
.length),
PSQLState
.
INVALID_PARAMETER_VALUE
); } } public boolean
isWrapperFor
(
Class
<?>
iface
) throws
SQLException
{ return
iface
.
isAssignableFrom
(
getClass
()); } public <T> T
unwrap
(
Class
<T>
iface
) throws
SQLException
{ if (
iface
.
isAssignableFrom
(
getClass
())) { return
iface
.
cast
(this); } throw new
SQLException
("Cannot unwrap to " +
iface
.
getName
()); } }
查找资源
Jre/Lib
输入类名或文件名
类结构窗口