| java.lang.Object com.mysql.jdbc.ResultSetMetaData
ResultSetMetaData | public class ResultSetMetaData implements java.sql.ResultSetMetaData(Code) | | A ResultSetMetaData object can be used to find out about the types and
properties of the columns in a ResultSet
author: Mark Matthews version: $Id: ResultSetMetaData.java,v 1.1.2.1 2005/05/13 18:58:38 mmatthews version: Exp $ See Also: java.sql.ResultSetMetaData |
Method Summary | |
public String | getCatalogName(int column) What's a column's table's catalog name?
Parameters: column - the first column is 1, the second is 2... | static String | getClassNameForJavaType(int javaType, boolean isUnsigned, int mysqlTypeIfKnown, boolean isBinaryOrBlob, boolean isOpaqueBinary) | public String | getColumnCharacterEncoding(int column) What's the Java character encoding name for the given column?
Parameters: column - the first column is 1, the second is 2, etc. | public String | getColumnCharacterSet(int column) What's the MySQL character set name for the given column?
Parameters: column - the first column is 1, the second is 2, etc. | public String | getColumnClassName(int column) JDBC 2.0
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. | public int | getColumnCount() | public int | getColumnDisplaySize(int column) What is the column's normal maximum width in characters?
Parameters: column - the first column is 1, the second is 2, etc. | public String | getColumnLabel(int column) What is the suggested column title for use in printouts and displays?
Parameters: column - the first column is 1, the second is 2, etc. | public String | getColumnName(int column) What's a column's name?
Parameters: column - the first column is 1, the second is 2, etc. | public int | getColumnType(int column) What is a column's SQL Type? (java.sql.Type int)
Parameters: column - the first column is 1, the second is 2, etc. | public String | getColumnTypeName(int column) Whats is the column's data source specific type name?
Parameters: column - the first column is 1, the second is 2, etc. | protected Field | getField(int columnIndex) | public int | getPrecision(int column) What is a column's number of decimal digits.
Parameters: column - the first column is 1, the second is 2... | public int | getScale(int column) What is a column's number of digits to the right of the decimal point?
Parameters: column - the first column is 1, the second is 2... | public String | getSchemaName(int column) What is a column's table's schema? This relies on us knowing the table
name. | public String | getTableName(int column) Whats a column's table's name?
Parameters: column - the first column is 1, the second is 2... | public boolean | isAutoIncrement(int column) Is the column automatically numbered (and thus read-only)
Parameters: column - the first column is 1, the second is 2... | public boolean | isCaseSensitive(int column) Does a column's case matter?
Parameters: column - the first column is 1, the second is 2... | public boolean | isCurrency(int column) Is the column a cash value?
Parameters: column - the first column is 1, the second is 2... | public boolean | isDefinitelyWritable(int column) Will a write on this column definately succeed?
Parameters: column - the first column is 1, the second is 2, etc.. | public int | isNullable(int column) Can you put a NULL in this column?
Parameters: column - the first column is 1, the second is 2... | public boolean | isReadOnly(int column) Is the column definitely not writable?
Parameters: column - the first column is 1, the second is 2, etc. | public boolean | isSearchable(int column) 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). | public boolean | isSigned(int column) Is the column a signed number?
Parameters: column - the first column is 1, the second is 2... | public boolean | isWrapperFor(Class iface) Returns true if this either implements the interface argument or is directly or indirectly a wrapper
for an object that does. | public boolean | isWritable(int column) Is it possible for a write on the column to succeed?
Parameters: column - the first column is 1, the second is 2, etc. | public String | toString() | public Object | unwrap(Class iface) Returns an object that implements the given interface to allow access to non-standard methods,
or standard methods not exposed by the proxy.
The result may be either the object found to implement the interface or a proxy for that object.
If the receiver implements the interface then that is the object. |
useOldAliasBehavior | boolean useOldAliasBehavior(Code) | | |
ResultSetMetaData | public ResultSetMetaData(Field[] fields, boolean useOldAliasBehavior)(Code) | | Initialise for a result with a tuple set and a field descriptor set
Parameters: fields - the array of field descriptors |
getCatalogName | public String getCatalogName(int column) throws SQLException(Code) | | What's a column's table's catalog name?
Parameters: column - the first column is 1, the second is 2... catalog name, or "" if not applicable throws: SQLException - if a database access error occurs |
getClassNameForJavaType | static String getClassNameForJavaType(int javaType, boolean isUnsigned, int mysqlTypeIfKnown, boolean isBinaryOrBlob, boolean isOpaqueBinary)(Code) | | |
getColumnCharacterEncoding | public String getColumnCharacterEncoding(int column) throws SQLException(Code) | | What's the Java character encoding name for the given column?
Parameters: column - the first column is 1, the second is 2, etc. the Java character encoding name for the given column, or null ifno Java character encoding maps to the MySQL character set forthe given column. throws: SQLException - if an invalid column index is given. |
getColumnCharacterSet | public String getColumnCharacterSet(int column) throws SQLException(Code) | | What's the MySQL character set name for the given column?
Parameters: column - the first column is 1, the second is 2, etc. the MySQL character set name for the given column throws: SQLException - if an invalid column index is given. |
getColumnClassName | public String getColumnClassName(int column) throws SQLException(Code) | | JDBC 2.0
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. ResultSet.getObject() may return a subClass of the class
returned by this method.
Parameters: column - the column number to retrieve information for the fully qualified name of the Java class whose instances aremanufactured if ResultSet.getObject() is called to retrieve avalue from the column. throws: SQLException - if an error occurs |
getColumnCount | public int getColumnCount() throws SQLException(Code) | | Whats the number of columns in the ResultSet?
the number throws: SQLException - if a database access error occurs |
getColumnDisplaySize | public int getColumnDisplaySize(int column) throws SQLException(Code) | | What is the column's normal maximum width in characters?
Parameters: column - the first column is 1, the second is 2, etc. the maximum width throws: SQLException - if a database access error occurs |
getColumnLabel | public String getColumnLabel(int column) throws SQLException(Code) | | What is the suggested column title for use in printouts and displays?
Parameters: column - the first column is 1, the second is 2, etc. the column label throws: SQLException - if a database access error occurs |
getColumnName | public String getColumnName(int column) throws SQLException(Code) | | What's a column's name?
Parameters: column - the first column is 1, the second is 2, etc. the column name throws: SQLException - if a databvase access error occurs |
getColumnType | public int getColumnType(int column) throws SQLException(Code) | | What is a column's SQL Type? (java.sql.Type int)
Parameters: column - the first column is 1, the second is 2, etc. the java.sql.Type value throws: SQLException - if a database access error occurs See Also: java.sql.Types |
getColumnTypeName | public String getColumnTypeName(int column) throws java.sql.SQLException(Code) | | Whats is the column's data source specific type name?
Parameters: column - the first column is 1, the second is 2, etc. the type name throws: SQLException - if a database access error occurs |
getField | protected Field getField(int columnIndex) throws SQLException(Code) | | Returns the field instance for the given column index
Parameters: columnIndex - the column number to retrieve a field instance for the field instance for the given column index throws: SQLException - if an error occurs |
getPrecision | public int getPrecision(int column) throws SQLException(Code) | | What is a column's number of decimal digits.
Parameters: column - the first column is 1, the second is 2... the precision throws: SQLException - if a database access error occurs |
getScale | public int getScale(int column) throws SQLException(Code) | | What is a column's number of digits to the right of the decimal point?
Parameters: column - the first column is 1, the second is 2... the scale throws: SQLException - if a database access error occurs |
getSchemaName | public String getSchemaName(int column) throws SQLException(Code) | | What is a column's table's schema? This relies on us knowing the table
name. The JDBC specification allows us to return "" if this is not
applicable.
Parameters: column - the first column is 1, the second is 2... the Schema throws: SQLException - if a database access error occurs |
getTableName | public String getTableName(int column) throws SQLException(Code) | | Whats a column's table's name?
Parameters: column - the first column is 1, the second is 2... column name, or "" if not applicable throws: SQLException - if a database access error occurs |
isAutoIncrement | public boolean isAutoIncrement(int column) throws SQLException(Code) | | Is the column automatically numbered (and thus read-only)
Parameters: column - the first column is 1, the second is 2... true if so throws: SQLException - if a database access error occurs |
isCaseSensitive | public boolean isCaseSensitive(int column) throws java.sql.SQLException(Code) | | Does a column's case matter?
Parameters: column - the first column is 1, the second is 2... true if so throws: java.sql.SQLException - if a database access error occurs |
isCurrency | public boolean isCurrency(int column) throws SQLException(Code) | | Is the column a cash value?
Parameters: column - the first column is 1, the second is 2... true if its a cash column throws: SQLException - if a database access error occurs |
isDefinitelyWritable | public boolean isDefinitelyWritable(int column) throws SQLException(Code) | | Will a write on this column definately succeed?
Parameters: column - the first column is 1, the second is 2, etc.. true if so throws: SQLException - if a database access error occurs |
isNullable | public int isNullable(int column) throws SQLException(Code) | | Can you put a NULL in this column?
Parameters: column - the first column is 1, the second is 2... one of the columnNullable values throws: SQLException - if a database access error occurs |
isReadOnly | public boolean isReadOnly(int column) throws SQLException(Code) | | Is the column definitely not writable?
Parameters: column - the first column is 1, the second is 2, etc. true if so throws: SQLException - if a database access error occurs |
isSearchable | public boolean isSearchable(int column) throws SQLException(Code) | | 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.
Parameters: column - the first column is 1, the second is 2... true if they can be used in a WHERE clause throws: SQLException - if a database access error occurs |
isSigned | public boolean isSigned(int column) throws SQLException(Code) | | Is the column a signed number?
Parameters: column - the first column is 1, the second is 2... true if so throws: SQLException - if a database access error occurs |
isWrapperFor | public boolean isWrapperFor(Class iface) throws SQLException(Code) | | 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 isWrapperFor on the wrapped
object. If this does not implement the interface and is not a wrapper, return false.
This method should be implemented as a low-cost operation compared to unwrap so that
callers can use this method to avoid expensive unwrap calls that may fail. If this method
returns true then calling unwrap with the same argument should succeed.
Parameters: interfaces - a Class defining an interface. true if this implements the interface or directly or indirectly wraps an object that does. throws: java.sql.SQLException - if an error occurs while determining whether this is a wrapperfor an object with the given interface. since: 1.6 |
isWritable | public boolean isWritable(int column) throws SQLException(Code) | | Is it possible for a write on the column to succeed?
Parameters: column - the first column is 1, the second is 2, etc. true if so throws: SQLException - if a database access error occurs |
toString | public String toString()(Code) | | Returns a string representation of this object
... |
unwrap | public Object unwrap(Class iface) throws java.sql.SQLException(Code) | | Returns an object that implements the given interface to allow access to non-standard methods,
or standard methods not exposed by the proxy.
The result may be either the object found to implement the interface or a proxy for that object.
If the receiver implements the interface then that is the object. If the receiver is a wrapper
and the wrapped object implements the interface then that is the object. Otherwise the object is
the result of calling unwrap recursively on the wrapped object. If the receiver is not a
wrapper and does not implement the interface, then an SQLException is thrown.
Parameters: iface - A Class defining an interface that the result must implement. an object that implements the interface. May be a proxy for the actual implementing object. throws: java.sql.SQLException - If no object found that implements the interface since: 1.6 |
|
|