Hitachi

Hitachi Advanced Database Application Development Guide


8.6.11 getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable)

Organization of this subsection

(1) Function

This method acquires information about the optimum column set for a table in which rows are identified uniquely.

(2) Format

public synchronized ResultSet getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable) throws SQLException

(3) Arguments

String catalog

Specifies a catalog name. This argument is ignored, if specified.

String schema

Specifies a schema name. This argument is ignored, if specified.

String table

Specifies a table name. This argument is ignored, if specified.

int scope

Specifies a target scale. This argument is ignored, if specified.

boolean nullable

Specifies whether a column in which the null value can be specified is included. This argument is ignored, if specified.

(4) Return value

This method always returns a ResultSet object that contains no retrieval result rows. The following table shows the format of the ResultSet object that is returned.

Table 8‒44: Format of the ResultSet object that is returned (getBestRowIdentifier method)

Column No.

Type

Column name

Description

1

short

SCOPE

Actual scale of the result

2

String

COLUMN_NAME

Column name

3

int

DATA_TYPE

SQL type

4

String

TYPE_NAME

Type name

5

int

COLUMN_SIZE

Precision

6

int

BUFFER_LENGTH

Not used

7

short

DECIMAL_DIGITS

Decimal places

8

short

PSEUDO_COLUMN

Whether this is a pseudo column

(5) Exceptions

If this Connection object is closed before this method is executed, the JDBC driver throws an SQLException.