|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mysql.jdbc.ResultSetMetaData
A ResultSetMetaData object can be used to find out about the types and properties of the columns in a ResultSet
ResultSetMetaData
Field Summary | |
(package private) Field[] |
fields
|
(package private) boolean |
useOldAliasBehavior
|
Fields inherited from interface java.sql.ResultSetMetaData |
columnNoNulls, columnNullable, columnNullableUnknown |
Constructor Summary | |
ResultSetMetaData(Field[] fields,
boolean useOldAliasBehavior)
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? |
(package private) static java.lang.String |
getClassNameForJavaType(int javaType,
boolean isUnsigned,
int mysqlTypeIfKnown,
boolean isBinaryOrBlob,
boolean isOpaqueBinary)
|
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 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()
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.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? |
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) |
boolean |
isCaseSensitive(int column)
Does a column's case matter? |
boolean |
isCurrency(int column)
Is the column a cash value? |
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? |
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? |
java.lang.String |
toString()
Returns a string representation of this object |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
Field[] fields
boolean useOldAliasBehavior
Constructor Detail |
public ResultSetMetaData(Field[] fields, boolean useOldAliasBehavior)
fields
- the array of field descriptorsMethod Detail |
public java.lang.String getCatalogName(int column) throws java.sql.SQLException
getCatalogName
in interface java.sql.ResultSetMetaData
column
- the first column is 1, the second is 2...
java.sql.SQLException
- if a database access error occurspublic java.lang.String getColumnCharacterEncoding(int column) throws java.sql.SQLException
column
- the first column is 1, the second is 2, etc.
java.sql.SQLException
- if an invalid column index is given.public java.lang.String getColumnCharacterSet(int column) throws java.sql.SQLException
column
- the first column is 1, the second is 2, etc.
java.sql.SQLException
- if an invalid column index is given.public java.lang.String getColumnClassName(int column) throws java.sql.SQLException
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.
getColumnClassName
in interface java.sql.ResultSetMetaData
column
- the column number to retrieve information for
java.sql.SQLException
- if an error occurspublic int getColumnCount() throws java.sql.SQLException
getColumnCount
in interface java.sql.ResultSetMetaData
java.sql.SQLException
- if a database access error occurspublic int getColumnDisplaySize(int column) throws java.sql.SQLException
getColumnDisplaySize
in interface java.sql.ResultSetMetaData
column
- the first column is 1, the second is 2, etc.
java.sql.SQLException
- if a database access error occurspublic java.lang.String getColumnLabel(int column) throws java.sql.SQLException
getColumnLabel
in interface java.sql.ResultSetMetaData
column
- the first column is 1, the second is 2, etc.
java.sql.SQLException
- if a database access error occurspublic java.lang.String getColumnName(int column) throws java.sql.SQLException
getColumnName
in interface java.sql.ResultSetMetaData
column
- the first column is 1, the second is 2, etc.
java.sql.SQLException
- if a databvase access error occurspublic int getColumnType(int column) throws java.sql.SQLException
getColumnType
in interface java.sql.ResultSetMetaData
column
- the first column is 1, the second is 2, etc.
java.sql.SQLException
- if a database access error occursTypes
public java.lang.String getColumnTypeName(int column) throws java.sql.SQLException
getColumnTypeName
in interface java.sql.ResultSetMetaData
column
- the first column is 1, the second is 2, etc.
java.sql.SQLException
- if a database access error occursprotected Field getField(int columnIndex) throws java.sql.SQLException
columnIndex
- the column number to retrieve a field instance for
java.sql.SQLException
- if an error occurspublic int getPrecision(int column) throws java.sql.SQLException
getPrecision
in interface java.sql.ResultSetMetaData
column
- the first column is 1, the second is 2...
java.sql.SQLException
- if a database access error occurspublic int getScale(int column) throws java.sql.SQLException
getScale
in interface java.sql.ResultSetMetaData
column
- the first column is 1, the second is 2...
java.sql.SQLException
- if a database access error occurspublic java.lang.String getSchemaName(int column) throws java.sql.SQLException
getSchemaName
in interface java.sql.ResultSetMetaData
column
- the first column is 1, the second is 2...
java.sql.SQLException
- if a database access error occurspublic java.lang.String getTableName(int column) throws java.sql.SQLException
getTableName
in interface java.sql.ResultSetMetaData
column
- the first column is 1, the second is 2...
java.sql.SQLException
- if a database access error occurspublic boolean isAutoIncrement(int column) throws java.sql.SQLException
isAutoIncrement
in interface java.sql.ResultSetMetaData
column
- the first column is 1, the second is 2...
java.sql.SQLException
- if a database access error occurspublic boolean isCaseSensitive(int column) throws java.sql.SQLException
isCaseSensitive
in interface java.sql.ResultSetMetaData
column
- the first column is 1, the second is 2...
java.sql.SQLException
- if a database access error occurspublic boolean isCurrency(int column) throws java.sql.SQLException
isCurrency
in interface java.sql.ResultSetMetaData
column
- the first column is 1, the second is 2...
java.sql.SQLException
- if a database access error occurspublic boolean isDefinitelyWritable(int column) throws java.sql.SQLException
isDefinitelyWritable
in interface java.sql.ResultSetMetaData
column
- the first column is 1, the second is 2, etc..
java.sql.SQLException
- if a database access error occurspublic int isNullable(int column) throws java.sql.SQLException
isNullable
in interface java.sql.ResultSetMetaData
column
- the first column is 1, the second is 2...
java.sql.SQLException
- if a database access error occurspublic boolean isReadOnly(int column) throws java.sql.SQLException
isReadOnly
in interface java.sql.ResultSetMetaData
column
- the first column is 1, the second is 2, etc.
java.sql.SQLException
- if a database access error occurspublic boolean isSearchable(int column) throws java.sql.SQLException
isSearchable
in interface java.sql.ResultSetMetaData
column
- the first column is 1, the second is 2...
java.sql.SQLException
- if a database access error occurspublic boolean isSigned(int column) throws java.sql.SQLException
isSigned
in interface java.sql.ResultSetMetaData
column
- the first column is 1, the second is 2...
java.sql.SQLException
- if a database access error occurspublic boolean isWritable(int column) throws java.sql.SQLException
isWritable
in interface java.sql.ResultSetMetaData
column
- the first column is 1, the second is 2, etc.
java.sql.SQLException
- if a database access error occurspublic java.lang.String toString()
static java.lang.String getClassNameForJavaType(int javaType, boolean isUnsigned, int mysqlTypeIfKnown, boolean isBinaryOrBlob, boolean isOpaqueBinary)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |