Hitachi

Hitachi Advanced Database Application Development Guide


8.6.81 getTypeInfo()

Organization of this subsection

(1) Function

This method acquires information about the default SQL types.

(2) Format

public synchronized ResultSet getTypeInfo() throws SQLException

(3) Arguments

None.

(4) Return value

The method returns a ResultSet object. The following table shows the format of the ResultSet object that is returned.

Table 8‒66: Format of the ResultSet object that is returned (getTypeInfo method)

Column No.

Type

Column name

Description

1

String

TYPE_NAME

Type name

2

short

DATA_TYPE

SQL data type of java.sql.Types

3

int

PRECISION

Maximum precision

4

String

LITERAL_PREFIX

Prefix used to quote literals

5

String

LITERAL_SUFFIX

Suffix used to quote literals

6

String

CREATE_PARAMS

Parameter used to create types

7

short

NULLABLE

Whether the null value is permitted for this type.

The method always returns typeNullableUnknown.

8

boolean

CASE_SENSITIVE

Whether the value is case sensitive:

  • true: Character string data types

  • false: Other data types

9

short

SEARCHABLE

Whether WHERE can be used for this type.

The method always returns typeSearchable.

10

boolean

UNSIGNED_ATTRIBUTE

Whether the attribute is unsigned.

The method returns false for numeric data (because it is signed) and true for other data types (because they are unsigned).

11

boolean

FIXED_PREC_SCALE

Whether this can be a currency value.

The method always returns false.

12

boolean

AUTO_INCREMENT

Whether this can be used as an automatic increment value.

The method always returns false.

13

String

LOCAL_TYPE_NAME

The type name's localized version.

The method returns the same value as the type name.

14

short

MINIMUM_SCALE

Supported minimum scale

15

short

MAXIMUM_SCALE

Supported maximum scale

16

int

SQL_DATA_TYPE

The null value is always returned.

17

int

SQL_DATETIME_SUB

The null value is always returned.

18

int

NUM_PREC_RADIX

10 for numeric data, 0 for all other data.

(5) Exceptions

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