public interface

ResultSetMetaData

java.sql.ResultSetMetaData
Known Indirect Subclasses

Class Overview

Provides information about the columns returned 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 an indexed column's catalog.
abstract String getColumnClassName(int column)
Returns the fully-qualified type of the class that is produced when invoking ResultSet.getObject to recover this column's value.
abstract int getColumnCount()
Returns number of columns contained in the associated result set.
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 as SQL type code.
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 digits to the right of the decimal point of 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 an indication of whether the indexed column is automatically incremented and is therefore read-only.
abstract boolean isCaseSensitive(int column)
Returns an indication of whether the case of the indexed column is important.
abstract boolean isCurrency(int column)
Returns whether 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 indication 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

Since: API Level 1

Indicates that a column cannot contain NULL values.

Constant Value: 0 (0x00000000)

public static final int columnNullable

Since: API Level 1

Indicates that a column can contain NULL values.

Constant Value: 1 (0x00000001)

public static final int columnNullableUnknown

Since: API Level 1

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)

Since: API Level 1

Returns the title of an indexed column's 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)

Since: API Level 1

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

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

public abstract int getColumnCount ()

Since: API Level 1

Returns number of columns contained in the associated result set.

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

public abstract int getColumnDisplaySize (int column)

Since: API Level 1

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)

Since: API Level 1

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)

Since: API Level 1

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)

Since: API Level 1

Returns the type of the indexed column as SQL type code.

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

public abstract String getColumnTypeName (int column)

Since: API Level 1

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)

Since: API Level 1

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)

Since: API Level 1

Returns the number of digits to the right of the decimal point of 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)

Since: API Level 1

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)

Since: API Level 1

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)

Since: API Level 1

Returns an indication of whether the indexed column is automatically incremented 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)

Since: API Level 1

Returns an indication 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)

Since: API Level 1

Returns whether 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)

Since: API Level 1

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)

Since: API Level 1

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)

Since: API Level 1

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)

Since: API Level 1

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)

Since: API Level 1

Returns an indication 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)

Since: API Level 1

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.