|
|||||||||
| Home >> All >> com >> mysql >> [ jdbc overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.mysql.jdbc
Class ResultSetMetaData

java.lang.Objectcom.mysql.jdbc.ResultSetMetaData
- All Implemented Interfaces:
- java.sql.ResultSetMetaData
- public class ResultSetMetaData
- extends java.lang.Object
- implements java.sql.ResultSetMetaData
- extends java.lang.Object
A ResultSetMetaData object can be used to find out about the types and properties of the columns in a ResultSet
- Version:
- $Id: ResultSetMetaData.java,v 1.12.2.12 2004/09/13 18:03:37 mmatthew Exp $
| Field Summary | |
(package private) Field[] |
fields
|
| Fields inherited from interface java.sql.ResultSetMetaData |
columnNoNulls, columnNullable, columnNullableUnknown |
| Constructor Summary | |
ResultSetMetaData(Field[] fields)
Initialise for a result with a tuple set and a field descriptor set |
|
| Method Summary | |
java.lang.String |
getCatalogName(int column)
What's a column's table's catalog name? |
java.lang.String |
getColumnCharacterEncoding(int column)
What's the Java character encoding name for the given column? |
java.lang.String |
getColumnCharacterSet(int column)
What's the MySQL character set name for the given column? |
java.lang.String |
getColumnClassName(int column)
JDBC 2.0 |
int |
getColumnCount()
Whats the number of columns in the ResultSet? |
int |
getColumnDisplaySize(int column)
What is the column's normal maximum width in characters? |
java.lang.String |
getColumnLabel(int column)
What is the suggested column title for use in printouts and displays? |
java.lang.String |
getColumnName(int column)
What's a column's name? |
int |
getColumnType(int column)
What is a column's SQL Type? (java.sql.Type int) |
java.lang.String |
getColumnTypeName(int column)
Whats is the column's data source specific type name? |
protected Field |
getField(int columnIndex)
Returns the field instance for the given column index |
int |
getPrecision(int column)
What is a column's number of decimal digits. |
int |
getScale(int column)
What is a column's number of digits to the right of the decimal point? |
java.lang.String |
getSchemaName(int column)
What is a column's table's schema? This relies on us knowing the table name. |
java.lang.String |
getTableName(int column)
Whats a column's table's name? |
boolean |
isAutoIncrement(int column)
Is the column automatically numbered (and thus read-only) MySQL Auto-increment columns are not read only, so to conform to the spec, this method returns false. |
boolean |
isCaseSensitive(int column)
Does a column's case matter? ASSUMPTION: Any field that is not obviously case insensitive is assumed to be case sensitive |
boolean |
isCurrency(int column)
Is the column a cash value? |
private static boolean |
isDecimalType(int type)
Checks if the SQL Type is a Decimal/Number Type |
boolean |
isDefinitelyWritable(int column)
Will a write on this column definately succeed? |
int |
isNullable(int column)
Can you put a NULL in this column? |
boolean |
isReadOnly(int column)
Is the column definitely not writable? |
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). |
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 |
fields
Field[] fields
| Constructor Detail |
ResultSetMetaData
public ResultSetMetaData(Field[] fields)
- Initialise for a result with a tuple set and
a field descriptor set
| Method Detail |
isAutoIncrement
public boolean isAutoIncrement(int column)
throws java.sql.SQLException
- Is the column automatically numbered (and thus read-only)
MySQL Auto-increment columns are not read only,
so to conform to the spec, this method returns false.
- Specified by:
isAutoIncrementin interfacejava.sql.ResultSetMetaData
isCaseSensitive
public boolean isCaseSensitive(int column)
throws java.sql.SQLException
- Does a column's case matter? ASSUMPTION: Any field that is
not obviously case insensitive is assumed to be case sensitive
- Specified by:
isCaseSensitivein interfacejava.sql.ResultSetMetaData
getCatalogName
public java.lang.String getCatalogName(int column) throws java.sql.SQLException
- What's a column's table's catalog name?
- Specified by:
getCatalogNamein interfacejava.sql.ResultSetMetaData
getColumnClassName
public java.lang.String getColumnClassName(int column) throws java.sql.SQLException
- 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.
- Specified by:
getColumnClassNamein interfacejava.sql.ResultSetMetaData
getColumnCharacterSet
public java.lang.String getColumnCharacterSet(int column) throws java.sql.SQLException
- What's the MySQL character set name for the given column?
getColumnCharacterEncoding
public java.lang.String getColumnCharacterEncoding(int column) throws java.sql.SQLException
- What's the Java character encoding name for the given column?
getColumnCount
public int getColumnCount()
throws java.sql.SQLException
- Whats the number of columns in the ResultSet?
- Specified by:
getColumnCountin interfacejava.sql.ResultSetMetaData
getColumnDisplaySize
public int getColumnDisplaySize(int column)
throws java.sql.SQLException
- What is the column's normal maximum width in characters?
- Specified by:
getColumnDisplaySizein interfacejava.sql.ResultSetMetaData
getColumnLabel
public java.lang.String getColumnLabel(int column) throws java.sql.SQLException
- What is the suggested column title for use in printouts and
displays?
- Specified by:
getColumnLabelin interfacejava.sql.ResultSetMetaData
getColumnName
public java.lang.String getColumnName(int column) throws java.sql.SQLException
- What's a column's name?
- Specified by:
getColumnNamein interfacejava.sql.ResultSetMetaData
getColumnType
public int getColumnType(int column)
throws java.sql.SQLException
- What is a column's SQL Type? (java.sql.Type int)
- Specified by:
getColumnTypein interfacejava.sql.ResultSetMetaData
getColumnTypeName
public java.lang.String getColumnTypeName(int column) throws java.sql.SQLException
- Whats is the column's data source specific type name?
- Specified by:
getColumnTypeNamein interfacejava.sql.ResultSetMetaData
isCurrency
public boolean isCurrency(int column)
throws java.sql.SQLException
- Is the column a cash value?
- Specified by:
isCurrencyin interfacejava.sql.ResultSetMetaData
isDefinitelyWritable
public boolean isDefinitelyWritable(int column)
throws java.sql.SQLException
- Will a write on this column definately succeed?
- Specified by:
isDefinitelyWritablein interfacejava.sql.ResultSetMetaData
isNullable
public int isNullable(int column)
throws java.sql.SQLException
- Can you put a NULL in this column?
- Specified by:
isNullablein interfacejava.sql.ResultSetMetaData
getPrecision
public int getPrecision(int column)
throws java.sql.SQLException
- What is a column's number of decimal digits.
- Specified by:
getPrecisionin interfacejava.sql.ResultSetMetaData
isReadOnly
public boolean isReadOnly(int column)
throws java.sql.SQLException
- Is the column definitely not writable?
- Specified by:
isReadOnlyin interfacejava.sql.ResultSetMetaData
getScale
public int getScale(int column)
throws java.sql.SQLException
- What is a column's number of digits to the right of the
decimal point?
- Specified by:
getScalein interfacejava.sql.ResultSetMetaData
getSchemaName
public java.lang.String getSchemaName(int column) throws java.sql.SQLException
- 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.
- Specified by:
getSchemaNamein interfacejava.sql.ResultSetMetaData
isSearchable
public boolean isSearchable(int column)
throws java.sql.SQLException
- 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.
- Specified by:
isSearchablein interfacejava.sql.ResultSetMetaData
isSigned
public boolean isSigned(int column)
throws java.sql.SQLException
- Is the column a signed number?
- Specified by:
isSignedin interfacejava.sql.ResultSetMetaData
getTableName
public java.lang.String getTableName(int column) throws java.sql.SQLException
- Whats a column's table's name?
- Specified by:
getTableNamein interfacejava.sql.ResultSetMetaData
isWritable
public boolean isWritable(int column)
throws java.sql.SQLException
- Is it possible for a write on the column to succeed?
- Specified by:
isWritablein interfacejava.sql.ResultSetMetaData
getField
protected Field getField(int columnIndex) throws java.sql.SQLException
- Returns the field instance for the given column index
isDecimalType
private static final boolean isDecimalType(int type)
- Checks if the SQL Type is a Decimal/Number Type
|
|||||||||
| Home >> All >> com >> mysql >> [ jdbc overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.mysql.jdbc.ResultSetMetaData