加载中...
The Wayback Machine - https://sup1a9wrlpyh5li9ro.vcoronado.top/web/20090218034131/http://developer.android.com:80/reference/java/sql/ResultSetMetaData.html
public interface

ResultSetMetaData

java.sql.ResultSetMetaData
Known Indirect Subclasses

Class Overview

Provides information about the columns in a ResultSet.

Summary

Constants
int columnNoNulls Indicates that a column cannot contain NULL values
int columnNullable Indicates that a column can contain NULL values
int columnNullableUnknown Indicates that it is unknown whether a column can contain NULLs or not
Public Methods
abstract String getCatalogName(int column)
Returns the title of indexed columns catalog
abstract String getColumnClassName(int column)
Returns the fully-qualified type of the class that is produced when invoking ResultSet.getObject to recover this columns value.
abstract int getColumnCount()
Returns a count of the columns in this set of results.
abstract int getColumnDisplaySize(int column)
Returns the indexed column's standard maximum width, expressed in number of characters.
abstract String getColumnLabel(int column)
Returns a recommended title for the indexed column, to be used when the title needs to be displayed.
abstract String getColumnName(int column)
Returns the title of the indexed column
abstract int getColumnType(int column)
Returns the type of the indexed column
abstract String getColumnTypeName(int column)
Returns the type name of the indexed column
abstract int getPrecision(int column)
Returns the decimal precision of the indexed column
abstract int getScale(int column)
Returns the number of decimal places in the indexed column.
abstract String getSchemaName(int column)
Returns the name of the indexed columns schema
abstract String getTableName(int column)
Returns the title of the indexed columns table.
abstract boolean isAutoIncrement(int column)
Returns and indication of whether the indexed column has automatic numbering and is therefore read-only
abstract boolean isCaseSensitive(int column)
Returns an indicator of whether the case of the indexed column is important
abstract boolean isCurrency(int column)
Returns if the indexed column contains a monetary amount.
abstract boolean isDefinitelyWritable(int column)
Returns an indication of whether writing to the indexed column is guaranteed to be successful
abstract int isNullable(int column)
Returns whether the indexed column is nullable.
abstract boolean isReadOnly(int column)
Returns an indication of whether writing to the indexed column is guaranteed to be unsuccessful
abstract boolean isSearchable(int column)
Returns an indication of whether the indexed column is searchable.
abstract boolean isSigned(int column)
Returns an indicator of whether the values contained in the indexed column are signed.
abstract boolean isWritable(int column)
Returns an indication of whether writing to the indexed column is possible.

Constants

public static final int columnNoNulls

Indicates that a column cannot contain NULL values

Constant Value: 0 (0x00000000)

public static final int columnNullable

Indicates that a column can contain NULL values

Constant Value: 1 (0x00000001)

public static final int columnNullableUnknown

Indicates that it is unknown whether a column can contain NULLs or not

Constant Value: 2 (0x00000002)

Public Methods

public abstract String getCatalogName (int column)

Returns the title of indexed columns catalog

Parameters
column the column index, starting at 1
Returns
  • the catalog title
Throws
SQLException if there is a database error

public abstract String getColumnClassName (int column)

Returns the fully-qualified type of the class that is produced when invoking ResultSet.getObject to recover this columns value.

Parameters
column the column index, starting at 1
Returns
  • the fully-qualified class name
Throws
SQLException if there is a database error

public abstract int getColumnCount ()

Returns a count of the columns in this set of results.

Returns
  • the column count
Throws
SQLException if there is a database error

public abstract int getColumnDisplaySize (int column)

Returns the indexed column's standard maximum width, expressed in number of characters.

Parameters
column the column index, starting at 1
Returns
  • the column's max width
Throws
SQLException if there is a database error

public abstract String getColumnLabel (int column)

Returns a recommended title for the indexed column, to be used when the title needs to be displayed.

Parameters
column the column index, starting at 1
Returns
  • the column's title
Throws
SQLException if there is a database error

public abstract String getColumnName (int column)

Returns the title of the indexed column

Parameters
column the column index, starting at 1
Returns
  • the column title
Throws
SQLException if there is a database error

public abstract int getColumnType (int column)

Returns the type of the indexed column

Parameters
column the column index, starting at 1
Returns
  • the column type
Throws
SQLException if there is a database error

public abstract String getColumnTypeName (int column)

Returns the type name of the indexed column

Parameters
column the column index, starting at 1
Returns
  • the type name
Throws
SQLException if there is a database error

public abstract int getPrecision (int column)

Returns the decimal precision of the indexed column

Parameters
column the column index, starting at 1
Returns
  • the precision
Throws
SQLException if there is a database error

public abstract int getScale (int column)

Returns the number of decimal places in the indexed column.

Parameters
column the column index, starting at 1
Returns
  • number of decimal places
Throws
SQLException if there is a database error

public abstract String getSchemaName (int column)

Returns the name of the indexed columns schema

Parameters
column the column index, starting at 1
Returns
  • the name of the columns schema
Throws
SQLException if there is a database error

public abstract String getTableName (int column)

Returns the title of the indexed columns table.

Parameters
column the column index, starting at 1
Returns
  • the table title
Throws
SQLException if there is a database error

public abstract boolean isAutoIncrement (int column)

Returns and indication of whether the indexed column has automatic numbering and is therefore read-only

Parameters
column the column index, starting at 1
Returns
  • true if it is automatically numbered, false otherwise
Throws
SQLException if there is a database error

public abstract boolean isCaseSensitive (int column)

Returns an indicator of whether the case of the indexed column is important

Parameters
column the column index, starting at 1
Returns
  • true if case matters, false otherwise
Throws
SQLException if there is a database error

public abstract boolean isCurrency (int column)

Returns if the indexed column contains a monetary amount.

Parameters
column the column index, starting at 1
Returns
  • true if it is a monetary value, false otherwise
Throws
SQLException if there is a database error

public abstract boolean isDefinitelyWritable (int column)

Returns an indication of whether writing to the indexed column is guaranteed to be successful

Parameters
column the column index, starting at 1
Returns
  • true if the write is guaranteed, false otherwise
Throws
SQLException if there is a database error

public abstract int isNullable (int column)

Returns whether the indexed column is nullable.

Parameters
column the column index, starting at 1
Returns
  • true if it is nullable, false otherwise
Throws
SQLException if there is a database error

public abstract boolean isReadOnly (int column)

Returns an indication of whether writing to the indexed column is guaranteed to be unsuccessful

Parameters
column the column index, starting at 1
Returns
  • true if the column is read-only, false otherwise
Throws
SQLException if there is a database error

public abstract boolean isSearchable (int column)

Returns an indication of whether the indexed column is searchable.

Parameters
column the column index, starting at 1
Returns
  • true if the indexed column is searchable, false otherwise.
Throws
SQLException if there is a database error

public abstract boolean isSigned (int column)

Returns an indicator of whether the values contained in the indexed column are signed.

Parameters
column the column index, starting at 1
Returns
  • true if they are signed, false otherwise
Throws
SQLException if there is a database error

public abstract boolean isWritable (int column)

Returns an indication of whether writing to the indexed column is possible.

Parameters
column the column index, starting at 1
Returns
  • true if it is possible to write, false otherwise
Throws
SQLException if there is a database error