类 ResultSetMetaData
- java.lang.Object
-
- com.mysql.cj.jdbc.result.ResultSetMetaData
-
- 所有已实现的接口:
ResultSetMetaData,Wrapper
public class ResultSetMetaData extends Object implements ResultSetMetaData
A ResultSetMetaData object can be used to find out about the types and properties of the columns in a ResultSet
-
-
字段概要
-
从接口继承的字段 java.sql.ResultSetMetaData
columnNoNulls, columnNullable, columnNullableUnknown
-
-
构造器概要
构造器 构造器 说明 ResultSetMetaData(Session session, Field[] fields, boolean useOldAliasBehavior, boolean treatYearAsDate, ExceptionInterceptor exceptionInterceptor)Initialize for a result with a tuple set and a field descriptor set
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 StringgetCatalogName(int column)StringgetColumnCharacterEncoding(int column)What's the Java character encoding name for the given column?StringgetColumnCharacterSet(int column)What's the MySQL character set name for the given column?StringgetColumnClassName(int column)intgetColumnCount()intgetColumnDisplaySize(int column)StringgetColumnLabel(int column)StringgetColumnName(int column)intgetColumnType(int column)StringgetColumnTypeName(int column)protected FieldgetField(int columnIndex)Returns the field instance for the given column indexField[]getFields()intgetPrecision(int column)intgetScale(int column)StringgetSchemaName(int column)StringgetTableName(int column)booleanisAutoIncrement(int column)booleanisCaseSensitive(int column)booleanisCurrency(int column)booleanisDefinitelyWritable(int column)intisNullable(int column)booleanisReadOnly(int column)booleanisSearchable(int column)booleanisSigned(int column)booleanisWrapperFor(Class<?> iface)booleanisWritable(int column)StringtoString()<T> Tunwrap(Class<T> iface)
-
-
-
构造器详细资料
-
ResultSetMetaData
public ResultSetMetaData(Session session, Field[] fields, boolean useOldAliasBehavior, boolean treatYearAsDate, ExceptionInterceptor exceptionInterceptor)
Initialize for a result with a tuple set and a field descriptor set- 参数:
session- thisSessionfields- the array of field descriptorsuseOldAliasBehavior- 'useOldAliasMetadataBehavior' property valuetreatYearAsDate- 'yearIsDateType' property valueexceptionInterceptor- exception interceptor
-
-
方法详细资料
-
getCatalogName
public String getCatalogName(int column) throws SQLException
- 指定者:
getCatalogName在接口中ResultSetMetaData- 抛出:
SQLException
-
getColumnCharacterEncoding
public String getColumnCharacterEncoding(int column) throws SQLException
What's the Java character encoding name for the given column?- 参数:
column- the first column is 1, the second is 2, etc.- 返回:
- the Java character encoding name for the given column, or null if no Java character encoding maps to the MySQL character set for the given column.
- 抛出:
SQLException- if an invalid column index is given.
-
getColumnCharacterSet
public String getColumnCharacterSet(int column) throws SQLException
What's the MySQL character set name for the given column?- 参数:
column- the first column is 1, the second is 2, etc.- 返回:
- the MySQL character set name for the given column
- 抛出:
SQLException- if an invalid column index is given.
-
getColumnClassName
public String getColumnClassName(int column) throws SQLException
- 指定者:
getColumnClassName在接口中ResultSetMetaData- 抛出:
SQLException
-
getColumnCount
public int getColumnCount() throws SQLException- 指定者:
getColumnCount在接口中ResultSetMetaData- 抛出:
SQLException
-
getColumnDisplaySize
public int getColumnDisplaySize(int column) throws SQLException- 指定者:
getColumnDisplaySize在接口中ResultSetMetaData- 抛出:
SQLException
-
getColumnLabel
public String getColumnLabel(int column) throws SQLException
- 指定者:
getColumnLabel在接口中ResultSetMetaData- 抛出:
SQLException
-
getColumnName
public String getColumnName(int column) throws SQLException
- 指定者:
getColumnName在接口中ResultSetMetaData- 抛出:
SQLException
-
getColumnType
public int getColumnType(int column) throws SQLException- 指定者:
getColumnType在接口中ResultSetMetaData- 抛出:
SQLException
-
getColumnTypeName
public String getColumnTypeName(int column) throws SQLException
- 指定者:
getColumnTypeName在接口中ResultSetMetaData- 抛出:
SQLException
-
getField
protected Field getField(int columnIndex) throws SQLException
Returns the field instance for the given column index- 参数:
columnIndex- the column number to retrieve a field instance for- 返回:
- the field instance for the given column index
- 抛出:
SQLException- if an error occurs
-
getPrecision
public int getPrecision(int column) throws SQLException- 指定者:
getPrecision在接口中ResultSetMetaData- 抛出:
SQLException
-
getScale
public int getScale(int column) throws SQLException- 指定者:
getScale在接口中ResultSetMetaData- 抛出:
SQLException
-
getSchemaName
public String getSchemaName(int column) throws SQLException
- 指定者:
getSchemaName在接口中ResultSetMetaData- 抛出:
SQLException
-
getTableName
public String getTableName(int column) throws SQLException
- 指定者:
getTableName在接口中ResultSetMetaData- 抛出:
SQLException
-
isAutoIncrement
public boolean isAutoIncrement(int column) throws SQLException- 指定者:
isAutoIncrement在接口中ResultSetMetaData- 抛出:
SQLException
-
isCaseSensitive
public boolean isCaseSensitive(int column) throws SQLException- 指定者:
isCaseSensitive在接口中ResultSetMetaData- 抛出:
SQLException
-
isCurrency
public boolean isCurrency(int column) throws SQLException- 指定者:
isCurrency在接口中ResultSetMetaData- 抛出:
SQLException
-
isDefinitelyWritable
public boolean isDefinitelyWritable(int column) throws SQLException- 指定者:
isDefinitelyWritable在接口中ResultSetMetaData- 抛出:
SQLException
-
isNullable
public int isNullable(int column) throws SQLException- 指定者:
isNullable在接口中ResultSetMetaData- 抛出:
SQLException
-
isReadOnly
public boolean isReadOnly(int column) throws SQLException- 指定者:
isReadOnly在接口中ResultSetMetaData- 抛出:
SQLException
-
isSearchable
public boolean isSearchable(int column) throws SQLException- 指定者:
isSearchable在接口中ResultSetMetaData- 抛出:
SQLException
-
isSigned
public boolean isSigned(int column) throws SQLException- 指定者:
isSigned在接口中ResultSetMetaData- 抛出:
SQLException
-
isWritable
public boolean isWritable(int column) throws SQLException- 指定者:
isWritable在接口中ResultSetMetaData- 抛出:
SQLException
-
isWrapperFor
public boolean isWrapperFor(Class<?> iface) throws SQLException
- 指定者:
isWrapperFor在接口中Wrapper- 抛出:
SQLException
-
unwrap
public <T> T unwrap(Class<T> iface) throws SQLException
- 指定者:
unwrap在接口中Wrapper- 抛出:
SQLException
-
getFields
public Field[] getFields()
-
-