public class PgResultSetMetaData extends java.lang.Object implements java.sql.ResultSetMetaData, PGResultSetMetaData
| Modifier and Type | Field and Description |
|---|---|
protected BaseConnection |
connection |
protected Field[] |
fields |
| Constructor and Description |
|---|
PgResultSetMetaData(BaseConnection connection,
Field[] fields) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getBaseColumnName(int column)
Returns the underlying column name of a query result, or "" if it is unable to be determined.
|
java.lang.String |
getBaseSchemaName(int column)
Returns the underlying schema name of query result, or "" if it is unable to be determined.
|
java.lang.String |
getBaseTableName(int column)
Returns the underlying table name of query result, or "" if it is unable to be determined.
|
java.lang.String |
getCatalogName(int column) |
java.lang.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) |
java.lang.String |
getColumnLabel(int column) |
java.lang.String |
getColumnName(int column) |
int |
getColumnType(int column) |
java.lang.String |
getColumnTypeName(int column) |
protected Field |
getField(int columnIndex) |
int |
getFormat(int column)
Is a column Text or Binary?
|
protected java.lang.String |
getPGType(int columnIndex) |
int |
getPrecision(int column) |
int |
getScale(int column) |
java.lang.String |
getSchemaName(int column) |
protected int |
getSQLType(int columnIndex) |
java.lang.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(java.lang.Class<?> iface) |
boolean |
isWritable(int column) |
<T> T |
unwrap(java.lang.Class<T> iface) |
protected final BaseConnection connection
protected final Field[] fields
public PgResultSetMetaData(BaseConnection connection, Field[] fields)
public int getColumnCount()
throws java.sql.SQLException
getColumnCount in interface java.sql.ResultSetMetaDatajava.sql.SQLExceptionpublic boolean isAutoIncrement(int column)
throws java.sql.SQLException
isAutoIncrement in interface java.sql.ResultSetMetaDatajava.sql.SQLExceptionpublic boolean isCaseSensitive(int column)
throws java.sql.SQLException
isCaseSensitive in interface java.sql.ResultSetMetaDatajava.sql.SQLExceptionpublic boolean isSearchable(int column)
throws java.sql.SQLException
isSearchable in interface java.sql.ResultSetMetaDatajava.sql.SQLExceptionpublic boolean isCurrency(int column)
throws java.sql.SQLException
isCurrency in interface java.sql.ResultSetMetaDatajava.sql.SQLExceptionpublic int isNullable(int column)
throws java.sql.SQLException
isNullable in interface java.sql.ResultSetMetaDatajava.sql.SQLExceptionpublic boolean isSigned(int column)
throws java.sql.SQLException
isSigned in interface java.sql.ResultSetMetaDatajava.sql.SQLExceptionpublic int getColumnDisplaySize(int column)
throws java.sql.SQLException
getColumnDisplaySize in interface java.sql.ResultSetMetaDatajava.sql.SQLExceptionpublic java.lang.String getColumnLabel(int column)
throws java.sql.SQLException
getColumnLabel in interface java.sql.ResultSetMetaDatajava.sql.SQLExceptionpublic java.lang.String getColumnName(int column)
throws java.sql.SQLException
getColumnName in interface java.sql.ResultSetMetaDatajava.sql.SQLExceptionpublic java.lang.String getBaseColumnName(int column)
throws java.sql.SQLException
PGResultSetMetaDatagetBaseColumnName in interface PGResultSetMetaDatacolumn - column position (1-based)java.sql.SQLException - if something wrong happenspublic java.lang.String getSchemaName(int column)
throws java.sql.SQLException
getSchemaName in interface java.sql.ResultSetMetaDatajava.sql.SQLExceptionpublic java.lang.String getBaseSchemaName(int column)
throws java.sql.SQLException
PGResultSetMetaDatagetBaseSchemaName in interface PGResultSetMetaDatacolumn - column position (1-based)java.sql.SQLException - if something wrong happenspublic int getPrecision(int column)
throws java.sql.SQLException
getPrecision in interface java.sql.ResultSetMetaDatajava.sql.SQLExceptionpublic int getScale(int column)
throws java.sql.SQLException
getScale in interface java.sql.ResultSetMetaDatajava.sql.SQLExceptionpublic java.lang.String getTableName(int column)
throws java.sql.SQLException
getTableName in interface java.sql.ResultSetMetaDatajava.sql.SQLExceptionpublic java.lang.String getBaseTableName(int column)
throws java.sql.SQLException
PGResultSetMetaDatagetBaseTableName in interface PGResultSetMetaDatacolumn - column position (1-based)java.sql.SQLException - if something wrong happenspublic java.lang.String getCatalogName(int column)
throws java.sql.SQLException
getCatalogName in interface java.sql.ResultSetMetaDatajava.sql.SQLExceptionpublic int getColumnType(int column)
throws java.sql.SQLException
getColumnType in interface java.sql.ResultSetMetaDatajava.sql.SQLExceptionpublic int getFormat(int column)
throws java.sql.SQLException
PGResultSetMetaDatagetFormat in interface PGResultSetMetaDatacolumn - column position (1-based)java.sql.SQLException - if something wrong happensField.BINARY_FORMAT,
Field.TEXT_FORMATpublic java.lang.String getColumnTypeName(int column)
throws java.sql.SQLException
getColumnTypeName in interface java.sql.ResultSetMetaDatajava.sql.SQLExceptionpublic boolean isReadOnly(int column)
throws java.sql.SQLException
isReadOnly in interface java.sql.ResultSetMetaDatajava.sql.SQLExceptionpublic boolean isWritable(int column)
throws java.sql.SQLException
isWritable in interface java.sql.ResultSetMetaDatajava.sql.SQLExceptionpublic boolean isDefinitelyWritable(int column)
throws java.sql.SQLException
isDefinitelyWritable in interface java.sql.ResultSetMetaDatajava.sql.SQLExceptionprotected Field getField(int columnIndex) throws java.sql.SQLException
java.sql.SQLExceptionprotected java.lang.String getPGType(int columnIndex)
throws java.sql.SQLException
java.sql.SQLExceptionprotected int getSQLType(int columnIndex)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.lang.String getColumnClassName(int column)
throws java.sql.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 java.sql.ResultSetMetaDatacolumn - 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.java.sql.SQLException - if a database access error occurspublic boolean isWrapperFor(java.lang.Class<?> iface)
throws java.sql.SQLException
isWrapperFor in interface java.sql.Wrapperjava.sql.SQLExceptionpublic <T> T unwrap(java.lang.Class<T> iface)
throws java.sql.SQLException
unwrap in interface java.sql.Wrapperjava.sql.SQLExceptionCopyright © 2018 PostgreSQL Global Development Group. All rights reserved.