Hitachi

Hitachi Advanced Database Application Development Guide


8.3.1 List of the methods in the Statement interface

Organization of this subsection

(1) Main functions of the Statement interface

The Statement interface provides the following main functions:

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

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

Table 8‒7: Methods in the Statement interface

No.

Method in the Statement interface

Function

1

addBatch(String sql)

Adds SQL statements to the Statement object's batch.

2

cancel()

Cancels the SQL statements executing in the corresponding object and in objects using the same connection as that object.

3

clearBatch()

Clears all SQL statements registered in this Statement object's batch.

4

clearWarnings()

Clears all warnings that have been reported for this Statement object.

5

close()

Closes the Statement object and any ResultSet object created from this Statement object.

6

closeOnCompletion()

Closes this Statement object when all result sets that depend on the Statement object are closed.

7

execute(String sql)

Executes an SQL statement.

8

executeBatch()

Executes the SQL statements registered in a batch and returns the number of updated rows as int data in an array.

9

executeLargeBatch()

Executes the SQL statements registered in a batch and returns the number of updated rows as long data in an array.

10

executeLargeUpdate(String sql)

Executes an SQL statement (other than a retrieval SQL statement) and returns the number of updated rows as long data.

11

executeQuery(String sql)

Executes a retrieval SQL statement and returns a ResultSet object containing the retrieval result.

12

executeUpdate(String sql)

Executes an SQL statement (other than a retrieval SQL statement) and returns the number of updated rows as int data.

13

getConnection()

Returns the Connection object that created the Statement object.

14

getFetchDirection()

Acquires the default fetch direction for a result set that is created from this Statement object.

15

getFetchSize()

Acquires the default fetch size (number of retrieval result rows to be transferred from the HADB server to the HADB client in the batch mode) for a ResultSet object that is created from the Statement object.

16

getHADBSQLSerialNum()

Acquires the SQL statement sequence number that is assigned to this Statement object.

17

getHADBStatementHandle()

Acquires the statement handle that is assigned to this Statement object.

18

getLargeMaxRows()

Acquires the maximum number of rows that can be stored in a ResultSet object created from this Statement object as long data.

19

getLargeUpdateCount()

Returns the number of updated rows as long data.

20

getMaxFieldSize()

Acquires the maximum number of bytes for a CHAR or VARCHAR column of a ResultSet object that is created by this Statement object.

21

getMaxRows()

Acquires the maximum number of rows that can be stored in a ResultSet object created from this Statement object as int data.

22

getMoreResults()

Moves to the next result set.

23

getQueryTimeout()

Acquires the timeout time set for SQL processing in the setQueryTimeout method.

24

getResultSet()

Acquires retrieval results as a ResultSet object.

25

getResultSetConcurrency()

Acquires the concurrent processing mode for a ResultSet object that is created from this Statement object.

26

getResultSetHoldability()

Acquires the holdability of the ResultSet object that is created from this Statement object.

27

getResultSetType()

Acquires the result set type of a ResultSet object that is created from this Statement object.

28

getUpdateCount()

Returns the number of updated rows as int data.

29

getWarnings()

Acquires the first warning that is reported by a call related to this Statement object.

30

isClosed()

Acquires a value indicating whether this Statement object is closed.

31

isCloseOnCompletion()

Acquires a value that indicates whether this Statement object is closed when all result sets that depend on the object are closed.

32

isPoolable()

Acquires a value indicating whether this Statement object can be pooled.

33

setCursorName(String name)

Specifies the SQL cursor name to be used by the execute method of the next Statement object.

34

setEscapeProcessing(boolean enable)

Specifies whether escape syntax analysis by this Statement object is to be enabled or disabled.

35

setFetchDirection(int direction)

Specifies the fetch direction for a result set that is created from this Statement object.

36

setFetchSize(int rows)

Specifies the default fetch size (number of retrieval result rows to be transferred from the HADB server to the HADB client in the batch mode) for a ResultSet object that is created from this Statement object.

37

setLargeMaxRows(long max)

Sets the maximum number of rows that can be stored in a ResultSet object created from this Statement object, as long data.

38

setMaxFieldSize(int max)

Specifies the maximum number of bytes for a CHAR or VARCHAR column in a ResultSet object that is created from this Statement object.

39

setMaxRows(int max)

Sets the maximum number of rows that can be stored in a ResultSet object created from this Statement object, as int data.

40

setQueryTimeout(int seconds)

Specifies the SQL processing timeout value.

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 Statement interface are as follows: