| Modifier and Type | Field and Description |
|---|---|
| protected final BaseConnection | |
| private boolean | |
| protected final Field[] |
| Access | Constructor and Description |
|---|---|
| public | PgResultSetMetaData(BaseConnection
the connection to retrieve metadata connection, Field[] the array of field descriptors fields)Initialise for a result with a tuple set and a field descriptor set |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public String | getBaseColumnName(int
column position (1-based) column)Implements org. Returns the underlying column name of a query result, or "" if it is unable to be determined. |
| public String | getBaseSchemaName(int
column position (1-based) column)Implements org. Returns the underlying schema name of query result, or "" if it is unable to be determined. |
| public String | getBaseTableName(int
column position (1-based) column)Implements org. Returns the underlying table name of query result, or "" if it is unable to be determined. |
| public String | Returns: catalog name, or "" if not applicablethe first column is 1, the second is 2... column)Implements java. Gets the designated column's table's catalog name. |
| public String | getColumnClassName(int
the first column is 1, the second is 2, ... column)Implements java. Returns the fully-qualified name of the Java class whose instances
are manufactured if the method |
| public int | getColumnCount()
Implements java. Returns the number of columns in this |
| public int | getColumnDisplaySize(int
the first column is 1, the second is 2, ... column)Implements java. Indicates the designated column's normal maximum width in characters. |
| public String | getColumnLabel(int
the first column is 1, the second is 2, ... column)Implements java. Gets the designated column's suggested title for use in printouts and displays. |
| public String | getColumnName(int
the first column is 1, the second is 2, ... column)Implements java. Get the designated column's name. |
| public int | getColumnType(int
the first column is 1, the second is 2, ... column)Implements java. Retrieves the designated column's SQL type. |
| public String | getColumnTypeName(int
the first column is 1, the second is 2, ... column)Implements java. Retrieves the designated column's database-specific type name. |
| protected Field | Returns: the Field descriptionthe first column is 1, the second is 2... columnIndex)For several routines in this package, we need to convert a columnIndex into a Field[] descriptor. |
| public int | getFormat(int
column position (1-based) column)Implements org. Is a column Text or Binary? |
| protected @Nullable String | |
| public int | getPrecision(int
the first column is 1, the second is 2, ... column)Implements java. Get the designated column's specified column size. |
| public int | getScale(int
the first column is 1, the second is 2, ... column)Implements java. Gets the designated column's number of digits to right of the decimal point. |
| public String | getSchemaName(int
the first column is 1, the second is 2, ... column)Implements java. Get the designated column's table's schema. |
| protected int | |
| public String | getTableName(int
the first column is 1, the second is 2, ... column)Implements java. Gets the designated column's table name. |
| public boolean | Returns: true if sothe first column is 1, the second is 2... column)Implements java. Indicates whether the designated column is automatically numbered. |
| public boolean | Returns: true if sothe first column is 1, the second is 2... column)Implements java. Indicates whether a column's case matters. |
| public boolean | Returns: true if its a cash columnthe first column is 1, the second is 2... column)Implements java. Indicates whether the designated column is a cash value. |
| public boolean | Returns: true if sothe first column is 1, the second is 2, etc.. column)Implements java. Indicates whether a write on the designated column will definitely succeed. |
| public int | isNullable(int
the first column is 1, the second is 2, ... column)Implements java. Indicates the nullability of values in the designated column. |
| public boolean | Returns: true if so*the first column is 1, the second is 2, etc.* column)Implements java. Indicates whether the designated column is definitely not writable. |
| public boolean | Returns: true if they can be used in a WHERE clausethe first column is 1, the second is 2... column)Implements java. Indicates whether the designated column can be used in a where clause. |
| public boolean | Returns: true if sothe first column is 1, the second is 2... column)Implements java. Indicates whether values in the designated column are signed numbers. |
| public boolean | isWrapperFor(Class<?>
a Class defining an interface. iface)Implements java. Returns true if this either implements the interface argument or is directly or indirectly a wrapper for an object that does. |
| public boolean | Returns: true if sothe first column is 1, the second is 2, etc. column)Implements java. Indicates whether it is possible for a write on the designated column to succeed. |
| private boolean | |
| public <T> T | unwrap(Class<T>
A Class defining an interface that the result must implement. iface)Implements java. Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy. |
| connection | back to summary |
|---|---|
| protected final BaseConnection connection | |
| fieldInfoFetched | back to summary |
|---|---|
| private boolean fieldInfoFetched | |
| fields | back to summary |
|---|---|
| protected final Field[] fields | |
| PgResultSetMetaData | back to summary |
|---|---|
| public PgResultSetMetaData(BaseConnection connection, Field[] fields) Initialise for a result with a tuple set and a field descriptor set
| |
| fetchFieldMetaData | back to summary |
|---|---|
| private void fetchFieldMetaData() throws SQLException | |
| getBaseColumnName | back to summary |
|---|---|
| public String getBaseColumnName(int column) throws SQLException Implements org. Doc from org. Returns the underlying column name of a query result, or "" if it is unable to be determined.
| |
| getBaseSchemaName | back to summary |
|---|---|
| public String getBaseSchemaName(int column) throws SQLException Implements org. Doc from org. Returns the underlying schema name of query result, or "" if it is unable to be determined.
| |
| getBaseTableName | back to summary |
|---|---|
| public String getBaseTableName(int column) throws SQLException Implements org. Doc from org. Returns the underlying table name of query result, or "" if it is unable to be determined.
| |
| getCatalogName | back to summary |
|---|---|
| public String getCatalogName(int column) throws SQLException Implements java. Doc from java. Gets the designated column's table's catalog name. As with getSchemaName(), we can say that if getTableName() returns n/a, then we can too - otherwise, we need to work on it.
| |
| getColumnClassName | back to summary |
|---|---|
| public String getColumnClassName(int column) throws SQLException Implements java. Doc from java. Returns the fully-qualified name of the Java class whose instances
are manufactured if the method
| |
| getColumnCount | back to summary |
|---|---|
| public int getColumnCount() throws SQLException Implements java. Doc from java. Returns the number of columns in this
| |
| getColumnDisplaySize | back to summary |
|---|---|
| public int getColumnDisplaySize(int column) throws SQLException Implements java. Doc from java. Indicates the designated column's normal maximum width in characters.
| |
| getColumnLabel | back to summary |
|---|---|
| public String getColumnLabel(int column) throws SQLException Implements java. Doc from java. Gets the designated column's suggested title for use in printouts and
displays. The suggested title is usually specified by the SQL
| |
| getColumnName | back to summary |
|---|---|
| public String getColumnName(int column) throws SQLException Implements java. Doc from java. Get the designated column's name.
| |
| getColumnType | back to summary |
|---|---|
| public int getColumnType(int column) throws SQLException Implements java. Doc from java. Retrieves the designated column's SQL type.
| |
| getColumnTypeName | back to summary |
|---|---|
| public String getColumnTypeName(int column) throws SQLException Implements java. Doc from java. Retrieves the designated column's database-specific type name.
| |
| getField | back to summary |
|---|---|
| protected Field getField(int columnIndex) throws SQLException For several routines in this package, we need to convert a columnIndex into a Field[] descriptor. Rather than do the same code several times, here it is.
| |
| getFormat | back to summary |
|---|---|
| public int getFormat(int column) throws SQLException Implements org. Doc from org. Is a column Text or Binary?
| |
| getPGType | back to summary |
|---|---|
| protected @Nullable String getPGType(int columnIndex) throws SQLException | |
| getPrecision | back to summary |
|---|---|
| public int getPrecision(int column) throws SQLException Implements java. Doc from java. Get the designated column's specified column size. 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.
| |
| getScale | back to summary |
|---|---|
| public int getScale(int column) throws SQLException Implements java. Doc from java. Gets the designated column's number of digits to right of the decimal point. 0 is returned for data types where the scale is not applicable.
| |
| getSchemaName | back to summary |
|---|---|
| public String getSchemaName(int column) throws SQLException Implements java. Doc from java. Get the designated column's table's schema.
| |
| getSQLType | back to summary |
|---|---|
| protected int getSQLType(int columnIndex) throws SQLException | |
| getTableName | back to summary |
|---|---|
| public String getTableName(int column) throws SQLException Implements java. Doc from java. Gets the designated column's table name.
| |
| isAutoIncrement | back to summary |
|---|---|
| public boolean isAutoIncrement(int column) throws SQLException Implements java. Doc from java. Indicates whether the designated column is automatically numbered. It is believed that PostgreSQL does not support this feature.
| |
| isCaseSensitive | back to summary |
|---|---|
| public boolean isCaseSensitive(int column) throws SQLException Implements java. Doc from java. Indicates whether a column's case matters. Does a column's case matter? ASSUMPTION: Any field that is not obviously case insensitive is assumed to be case sensitive
| |
| isCurrency | back to summary |
|---|---|
| public boolean isCurrency(int column) throws SQLException Implements java. Doc from java. Indicates whether the designated column is a cash value. Is the column a cash value? 6.1 introduced the cash/money type, which haven't been incorporated as of 970414, so I just check the type name for both 'cash' and 'money'
| |
| isDefinitelyWritable | back to summary |
|---|---|
| public boolean isDefinitelyWritable(int column) throws SQLException Implements java. Doc from java. Indicates whether a write on the designated column will definitely succeed. Hmmm...this is a bad one, since the two preceding functions have not been really defined. I cannot tell is the short answer. I thus return isWritable() just to give us an idea.
| |
| isNullable | back to summary |
|---|---|
| public int isNullable(int column) throws SQLException Implements java. Doc from java. Indicates the nullability of values in the designated column.
| |
| isReadOnly | back to summary |
|---|---|
| public boolean isReadOnly(int column) throws SQLException Implements java. Doc from java. Indicates whether the designated column is definitely not writable. In reality, we would have to check the GRANT/REVOKE stuff for this to be effective, and I haven't really looked into that yet, so this will get re-visited.
| |
| isSearchable | back to summary |
|---|---|
| public boolean isSearchable(int column) throws SQLException Implements java. Doc from java. Indicates whether the designated column can be used in a where clause. Can the column be used in a WHERE clause? Basically for this, I split the functions into two types: recognised types (which are always useable), and OTHER types (which may or may not be useable). The OTHER types, for now, I will assume they are useable. We should really query the catalog to see if they are useable.
| |
| isSigned | back to summary |
|---|---|
| public boolean isSigned(int column) throws SQLException Implements java. Doc from java. Indicates whether values in the designated column are signed numbers. Is the column a signed number? In PostgreSQL, all numbers are signed, so this is trivial. However, strings are not signed (duh!)
| |
| isWrapperFor | back to summary |
|---|---|
| public boolean isWrapperFor(Class<?> iface) throws SQLException Implements java. Doc from java. Returns true if this either implements the interface argument or is directly or indirectly a wrapper
for an object that does. Returns false otherwise. If this implements the interface then return true,
else if this is a wrapper then return the result of recursively calling
| |
| isWritable | back to summary |
|---|---|
| public boolean isWritable(int column) throws SQLException Implements java. Doc from java. Indicates whether it is possible for a write on the designated column to succeed. In reality have to check the GRANT/REVOKE stuff, which I haven't worked with as yet. However, if it isn't ReadOnly, then it is obviously writable.
| |
| populateFieldsWithMetadata | back to summary |
|---|---|
| private boolean populateFieldsWithMetadata(Gettable<FieldMetadata. | |
| unwrap | back to summary |
|---|---|
| public <T> T unwrap(Class<T> iface) throws SQLException Implements java. Doc from java. Returns an object that implements the given interface to allow access to
non-standard methods, or standard methods not exposed by the proxy.
If the receiver implements the interface then the result is the receiver
or a proxy for the receiver. If the receiver is a wrapper
and the wrapped object implements the interface then the result is the
wrapped object or a proxy for the wrapped object. Otherwise return the
the result of calling
| |