Hitachi

Hitachi Advanced Database Application Development Guide


8.2.1 List of the methods in the Connection interface

Organization of this subsection

(1) Main functions of the Connection interface

The Connection interface provides the following main functions:

(2) Methods in the Connection interface that are supported by HADB

The following table lists and describes the methods in the Connection interface that are supported by HADB.

Table 8‒4: Methods in the Connection interface

No.

Method in the Connection interface

Function

1

clearWarnings()

Clears all warnings reported to the Connection object.

2

close()

Closes the connection with the HADB server.

3

commit()

Applies all changes made since the most recent commit or rollback.

4

createStatement()

Creates a Statement object for sending an SQL statement to the HADB server.

5

createStatement(int resultSetType, int resultSetConcurrency)

6

createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability)

7

getAutoCommit()

Acquires the current automatic commit mode for this Connection object.

8

getCatalog()

Acquires the current catalog name for this Connection object.

9

getHADBConnectionID()

Acquires the connection ID that is assigned to this Connection object.

10

getHADBConnectionSerialNum()

Acquires the connection sequence number that is assigned to this Connection object.

11

getHADBOrderMode()

Acquires for this Connection object the sort order for character string data in a SELECT statement in which the ORDER BY clause is specified.

12

getHADBSQLHashFltSize()

Acquires the size of the hash filter area that is set for this Connection object.

13

getHADBSQLHashTblSize()

Acquires the size of the hash table area that is set for this Connection object.

14

getHADBSQLMaxRthdNum()

Acquires the maximum number of SQL processing real threads that is set for this Connection object.

15

getHADBTransactionID()

Acquires the transaction ID of the transaction that is being executed.

16

getHoldability()

Acquires the current holdability of the ResultSet object that is created by using this Connection object.

17

getMetaData()

Creates a DatabaseMetaData object.

18

getSchema()

Acquires the current schema name for this Connection object.

19

getTransactionIsolation()

Acquires the current transaction isolation level for this Connection object.

20

getTypeMap()

Acquires the Map object related to this Connection object.

21

getWarnings()

Acquires as an SQLWarning object a warning reported by a call related to this Connection object.

22

isClosed()

Returns a value indicating whether this Connection object is closed.

23

isReadOnly()

Acquires a value indicating whether this Connection object is in read-only mode.

24

isValid(int timeout)

Acquires the current connection status.

25

nativeSQL(String sql)

Converts escape clauses in a specified SQL statement to a format that can be executed by HADB.

26

prepareStatement(String sql)

Creates a PreparedStatement object for sending an SQL statement with parameters to the HADB server.

27

prepareStatement(String sql, int resultSetType, int resultSetConcurrency)

28

prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)

29

rollback()

Undoes all changes made by the transaction and releases all locks currently held by the Connection object.

30

setAutoCommit(boolean autoCommit)

Sets the automatic commit mode for this connection.

31

setCatalog(String catalog)

Sets the passed catalog name and selects a database work subspace for the Connection object.

32

setHADBAuditInfo(int pos,String userinfo)

Sets the user-specific connection information (user-added information).

33

setHADBOrderMode(int mode)

Sets for this Connection object the sort order for character string data in a SELECT statement in which the ORDER BY clause is specified.

34

setHADBSQLHashFltSize(int areaSize)

Sets for this Connection object the size of the hash filter area.

35

setHADBSQLHashTblSize(int areaSize)

Sets for this Connection object the size of the hash table area.

36

setHADBSQLMaxRthdNum(int rthdNum)

Sets for this Connection object the maximum number of SQL processing real threads.

37

setHoldability(int holdability)

Sets the holdability of the ResultSet object that is created by using this Connection object.

38

setReadOnly(boolean readOnly)

Sets this Connection object in the read-only mode. Sets the transaction access mode.

39

setSchema(String schema)

Sets the name of the schema to access.

40

setTransactionIsolation(int level)

Sets the transaction isolation level for this Connection object.

Important

HADB does not support methods that are not listed in this table. If an unsupported method is executed, an SQLException might be thrown.

(3) Required package name and class name

The package and class names required in order to use the Connection interface are as follows: