public class PgResultSetMetaData extends Object implements ResultSetMetaData, PGResultSetMetaData
Modifier and Type | Field and Description |
---|---|
protected BaseConnection |
connection |
protected Field[] |
fields |
columnNoNulls, columnNullable, columnNullableUnknown
Constructor and Description |
---|
PgResultSetMetaData(BaseConnection connection,
Field[] fields) |
Modifier and Type | Method and Description |
---|---|
String |
getBaseColumnName(int column)
Returns the underlying column name of a query result, or "" if it is unable to be determined.
|
String |
getBaseSchemaName(int column)
Returns the underlying schema name of query result, or "" if it is unable to be determined.
|
String |
getBaseTableName(int column)
Returns the underlying table name of query result, or "" if it is unable to be determined.
|
String |
getCatalogName(int column) |
String |
getColumnClassName(int column)
Returns the fully-qualified name of the Java class whose instances are manufactured if the
method
ResultSet.getObject is called to retrieve a value from the column. |
int |
getColumnCount() |
int |
getColumnDisplaySize(int column) |
String |
getColumnLabel(int column) |
String |
getColumnName(int column) |
int |
getColumnType(int column) |
String |
getColumnTypeName(int column) |
protected Field |
getField(int columnIndex) |
int |
getFormat(int column)
Is a column Text or Binary?
|
protected String |
getPGType(int columnIndex) |
int |
getPrecision(int column) |
int |
getScale(int column) |
String |
getSchemaName(int column) |
protected int |
getSQLType(int columnIndex) |
String |
getTableName(int column) |
boolean |
isAutoIncrement(int column) |
boolean |
isCaseSensitive(int column) |
boolean |
isCurrency(int column) |
boolean |
isDefinitelyWritable(int column) |
int |
isNullable(int column) |
boolean |
isReadOnly(int column) |
boolean |
isSearchable(int column) |
boolean |
isSigned(int column) |
boolean |
isWrapperFor(Class<?> iface) |
boolean |
isWritable(int column) |
<T> T |
unwrap(Class<T> iface) |
protected final BaseConnection connection
protected final Field[] fields
public PgResultSetMetaData(BaseConnection connection, Field[] fields)
public int getColumnCount() throws SQLException
getColumnCount
in interface ResultSetMetaData
SQLException
public boolean isAutoIncrement(int column) throws SQLException
isAutoIncrement
in interface ResultSetMetaData
SQLException
public boolean isCaseSensitive(int column) throws SQLException
isCaseSensitive
in interface ResultSetMetaData
SQLException
public boolean isSearchable(int column) throws SQLException
isSearchable
in interface ResultSetMetaData
SQLException
public boolean isCurrency(int column) throws SQLException
isCurrency
in interface ResultSetMetaData
SQLException
public int isNullable(int column) throws SQLException
isNullable
in interface ResultSetMetaData
SQLException
public boolean isSigned(int column) throws SQLException
isSigned
in interface ResultSetMetaData
SQLException
public int getColumnDisplaySize(int column) throws SQLException
getColumnDisplaySize
in interface ResultSetMetaData
SQLException
public String getColumnLabel(int column) throws SQLException
getColumnLabel
in interface ResultSetMetaData
SQLException
public String getColumnName(int column) throws SQLException
getColumnName
in interface ResultSetMetaData
SQLException
public String getBaseColumnName(int column) throws SQLException
PGResultSetMetaData
getBaseColumnName
in interface PGResultSetMetaData
column
- column position (1-based)SQLException
- if something wrong happenspublic String getSchemaName(int column) throws SQLException
getSchemaName
in interface ResultSetMetaData
SQLException
public String getBaseSchemaName(int column) throws SQLException
PGResultSetMetaData
getBaseSchemaName
in interface PGResultSetMetaData
column
- column position (1-based)SQLException
- if something wrong happenspublic int getPrecision(int column) throws SQLException
getPrecision
in interface ResultSetMetaData
SQLException
public int getScale(int column) throws SQLException
getScale
in interface ResultSetMetaData
SQLException
public String getTableName(int column) throws SQLException
getTableName
in interface ResultSetMetaData
SQLException
public String getBaseTableName(int column) throws SQLException
PGResultSetMetaData
getBaseTableName
in interface PGResultSetMetaData
column
- column position (1-based)SQLException
- if something wrong happenspublic String getCatalogName(int column) throws SQLException
getCatalogName
in interface ResultSetMetaData
SQLException
public int getColumnType(int column) throws SQLException
getColumnType
in interface ResultSetMetaData
SQLException
public int getFormat(int column) throws SQLException
PGResultSetMetaData
getFormat
in interface PGResultSetMetaData
column
- column position (1-based)SQLException
- if something wrong happensField.BINARY_FORMAT
,
Field.TEXT_FORMAT
public String getColumnTypeName(int column) throws SQLException
getColumnTypeName
in interface ResultSetMetaData
SQLException
public boolean isReadOnly(int column) throws SQLException
isReadOnly
in interface ResultSetMetaData
SQLException
public boolean isWritable(int column) throws SQLException
isWritable
in interface ResultSetMetaData
SQLException
public boolean isDefinitelyWritable(int column) throws SQLException
isDefinitelyWritable
in interface ResultSetMetaData
SQLException
protected Field getField(int columnIndex) throws SQLException
SQLException
protected String getPGType(int columnIndex) throws SQLException
SQLException
protected int getSQLType(int columnIndex) throws SQLException
SQLException
public String getColumnClassName(int column) throws SQLException
ResultSet.getObject
is called to retrieve a value from the column.
ResultSet.getObject
may return a subclass of the class returned by this method.getColumnClassName
in interface ResultSetMetaData
column
- the first column is 1, the second is 2, ...ResultSet.getObject
to retrieve the value in the
specified column. This is the class name used for custom mapping.SQLException
- if a database access error occurspublic boolean isWrapperFor(Class<?> iface) throws SQLException
isWrapperFor
in interface Wrapper
SQLException
public <T> T unwrap(Class<T> iface) throws SQLException
unwrap
in interface Wrapper
SQLException
Copyright © 2016 PostgreSQL Global Development Group. All rights reserved.