|
1.51.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--interbase.interclient.ResultSetMetaData
Describes column information for a result set.
A ResultSetMetaData object can be used to find out about the types and properties of the columns in a ResultSet.
InterClient Notes:
Here are the column names, labels, and base tables
to expect from some typical result sets:
Query | Column Name | Column Label | Table Name |
---|---|---|---|
select F from T
| "F"
| "F"
| "T"
|
select F as A from T
| "F"
| "A"
| "T"
|
select F+1 from T
| ""
| ""
| ""
|
select MAX(F) from T
| "MAX"
| "MAX"
| ""
|
Notice that calculated result columns have no physical table name, and may or may not have an ad hoc column label or name.
Field Summary | |
static int |
columnNoNulls
Does not allow NULL values. |
static int |
columnNullable
Allows NULL values. |
static int |
columnNullableUnknown
Nullability unknown. |
Method Summary | |
int |
getArrayBaseType(int column)
Gets an array column's base SQL type from java.sql.Types. |
int[][] |
getArrayDimensions(int column)
Gets an array column's dimensions and bounds. |
String |
getCatalogName(int column)
What's a column's table's catalog name. |
String |
getColumnClassName(int column)
Return the fully qualified name of the Java class whose instances are manufactured if ResultSet.getObject() is called to retrieve a value from the column. |
int |
getColumnCount()
Gets the number of columns in the ResultSet. |
int |
getColumnDisplaySize(int column)
What's the column's normal max width in chars. |
String |
getColumnLabel(int column)
Gets the suggested column title for use in printouts and displays. |
String |
getColumnName(int column)
What's a column's name. |
int |
getColumnType(int column)
What's a column's SQL type. |
String |
getColumnTypeName(int column)
What's a column's data source specific type name. |
int |
getPrecision(int column)
What's a column's number of decimal digits. |
int |
getScale(int column)
What's a column's number of digits to right of the decimal point. |
String |
getSchemaName(int column)
What's a column's table's schema. |
String |
getTableName(int column)
Gets a column's origination table name. |
boolean |
isAutoIncrement(int column)
Is the column automatically numbered, thus read-only. |
boolean |
isCaseSensitive(int column)
Does a column's case matters. |
boolean |
isCurrency(int column)
Is the column a cash value. |
boolean |
isDefinitelyWritable(int column)
Will a write on the column definitely succeed. |
int |
isNullable(int column)
Can you can put a NULL in this column. |
boolean |
isReadOnly(int column)
Is a column definitely not writable. |
boolean |
isSearchable(int column)
Can a column be used in a where clause. |
boolean |
isSigned(int column)
Is the column a signed number. |
boolean |
isWritable(int column)
Is it possible for a write on the column to succeed. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int columnNoNulls
public static final int columnNullable
public static final int columnNullableUnknown
Method Detail |
public int getColumnCount() throws SQLException
public boolean isAutoIncrement(int column) throws SQLException
InterClient note: Always returns false for InterClient. The capability does not currently exist to determine an InterBase generator field dynamically.
column
- the first column is 1, the second is 2, ...public boolean isCaseSensitive(int column) throws SQLException
InterClient note: Always returns true for InterBase. Text fields in InterBase are always case sensitive, even text blobs when using the 'containing' operator.
column
- the first column is 1, the second is 2, ...public boolean isSearchable(int column) throws SQLException
InterClient note: Always returns true for InterBase. In InterBase, even a blob field can be used in a where clause, eg. "WHERE blob-field CONTAINING foobar"
column
- the first column is 1, the second is 2, ...public boolean isCurrency(int column) throws SQLException
InterClient note: Always returns false for InterBase. InterBase does not support a money type.
column
- the first column is 1, the second is 2, ...public int isNullable(int column) throws SQLException
InterClient note: Unlike other RDBMS vendors, InterBase can always determine column nullability dynamically, so InterClient never returns columnNullableUnknown.
column
- the first column is 1, the second is 2, ...public boolean isSigned(int column) throws SQLException
column
- the first column is 1, the second is 2, ...public int getColumnDisplaySize(int column) throws SQLException
column
- the first column is 1, the second is 2, ...public String getColumnLabel(int column) throws SQLException
InterClient Notes:
See the table in the ResultSetMetaData
class header
documentation for the column labels associated with some typical SQL queries.
column
- the first column is 1, the second is 2, ...public String getColumnName(int column) throws SQLException
InterClient Notes:
See the table in the ResultSetMetaData
class header
documentation for the column names associated with some typical SQL queries.
column
- the first column is 1, the second is 2, ...public String getSchemaName(int column) throws SQLException
InterClient note: Always returns "". InterBase does not support schemas.
column
- the first column is 1, the second is 2, ...public int getPrecision(int column) throws SQLException
column
- the first column is 1, the second is 2, ...public int getScale(int column) throws SQLException
column
- the first column is 1, the second is 2, ...public String getTableName(int column) throws SQLException
InterClient Notes:
See the table in the ResultSetMetaData
class header
documentation for the tables names associated with some typical SQL queries.
public String getCatalogName(int column) throws SQLException
InterClient note: Always returns "". InterBase does not support catalogs.
column
- the first column is 1, the second is 2, ...public int getColumnType(int column) throws SQLException
column
- the first column is 1, the second is 2, ...public String getColumnTypeName(int column) throws SQLException
column
- the first column is 1, the second is 2, ...public boolean isReadOnly(int column) throws SQLException
InterClient note: This returns true for a column which is a computed field, or is a view field, or the current user does not have the necessary SQL privileges to write to this field.
column
- the first column is 1, the second is 2, ...public boolean isWritable(int column) throws SQLException
InterClient note: This returns true for a column which is not a computed field, and is not a view field, and the current user has the necessary SQL privileges to write to this field.
column
- the first column is 1, the second is 2, ...public boolean isDefinitelyWritable(int column) throws SQLException
InterClient note:
Always returns false
.
We can never guarantee this for InterBase because there may
be triggers which could abort upon writing the column.
column
- the first column is 1, the second is 2, ...public String getColumnClassName(int column) throws SQLException
public int getArrayBaseType(int column) throws SQLException
column
- the first column is 1, the second is 2, ...public int[][] getArrayDimensions(int column) throws SQLException
column
- the first column is 1, the second is 2, ...
|
1.51.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |