CommandInterface

Represents a SQL statement.

Methods
void cancel()
Cancel the statement if it is still processing.
void cancel()
Cancel the statement if it is still processing.
void close()
Close the statement.
void close()
Close the statement.
ResultInterface executeQuery(int maxRows, boolean scrollable)
Execute the query.
ResultInterface executeQuery(int maxRows, boolean scrollable)
Execute the query.
Parameters:
maxRows - the maximum number of rows returned
scrollable - if the result set must be scrollable
Returns:
the result
ResultWithGeneratedKeys executeUpdate(Object generatedKeysRequest)
Execute the statement
ResultWithGeneratedKeys executeUpdate(Object generatedKeysRequest)
Execute the statement
Parameters:
generatedKeysRequest - {@code false} if generated keys are not needed, {@code true} if generated keys should be configured automatically, {@code int[]} to specify column indices to return generated keys from, or {@code String[]} to specify column names to return generated keys from
Returns:
the update count
int getCommandType()
Get command type.
int getCommandType()
Get command type.
Returns:
one of the constants above
ResultInterface getMetaData()
Get an empty result set containing the meta data of the result.
ResultInterface getMetaData()
Get an empty result set containing the meta data of the result.
Returns:
the empty result
ArrayList getParameters()
Get the parameters (if any).
ArrayList getParameters()
Get the parameters (if any).
Returns:
the parameters
boolean isQuery()
Check if this is a query.
boolean isQuery()
Check if this is a query.
Returns:
true if it is a query
void stop()
Stop the command execution, release all locks and resources
void stop()
Stop the command execution, release all locks and resources

Fields
static int ALTER_INDEX_RENAME = 1
static int ALTER_SCHEMA_RENAME = 2
static int ALTER_SEQUENCE = 54
static int ALTER_TABLE_ADD_COLUMN = 7
static int ALTER_TABLE_ADD_CONSTRAINT_CHECK = 3
static int ALTER_TABLE_ADD_CONSTRAINT_PRIMARY_KEY = 6
static int ALTER_TABLE_ADD_CONSTRAINT_REFERENTIAL = 5
static int ALTER_TABLE_ADD_CONSTRAINT_UNIQUE = 4
static int ALTER_TABLE_ALTER_COLUMN_CHANGE_TYPE = 11
static int ALTER_TABLE_ALTER_COLUMN_DEFAULT = 10
static int ALTER_TABLE_ALTER_COLUMN_NOT_NULL = 8
static int ALTER_TABLE_ALTER_COLUMN_NULL = 9
static int ALTER_TABLE_ALTER_COLUMN_ON_UPDATE = 90
static int ALTER_TABLE_ALTER_COLUMN_RENAME = 16
static int ALTER_TABLE_ALTER_COLUMN_SELECTIVITY = 13
static int ALTER_TABLE_ALTER_COLUMN_VISIBILITY = 87
static int ALTER_TABLE_DROP_COLUMN = 12
static int ALTER_TABLE_DROP_CONSTRAINT = 14
static int ALTER_TABLE_RENAME = 15
static int ALTER_TABLE_RENAME_CONSTRAINT = 85
static int ALTER_TABLE_SET_REFERENTIAL_INTEGRITY = 55
static int ALTER_USER_ADMIN = 17
static int ALTER_USER_RENAME = 18
static int ALTER_USER_SET_PASSWORD = 19
static int ALTER_VIEW = 20
static int ANALYZE = 21
static int BACKUP = 56
static int BEGIN = 83
static int CALL = 57
static int CHECKPOINT = 73
static int CHECKPOINT_SYNC = 76
static int COMMENT = 52
static int COMMIT = 71
static int COMMIT_TRANSACTION = 78
static int CREATE_AGGREGATE = 22
static int CREATE_ALIAS = 24
static int CREATE_CONSTANT = 23
static int CREATE_DOMAIN = 33
static int CREATE_INDEX = 25
static int CREATE_LINKED_TABLE = 26
static int CREATE_ROLE = 27
static int CREATE_SCHEMA = 28
static int CREATE_SEQUENCE = 29
static int CREATE_SYNONYM = 88
static int CREATE_TABLE = 30
static int CREATE_TRIGGER = 31
static int CREATE_USER = 32
static int CREATE_VIEW = 34
static int DEALLOCATE = 35
static int DELETE = 58
static int DROP_AGGREGATE = 36
static int DROP_ALIAS = 39
static int DROP_ALL_OBJECTS = 38
static int DROP_CONSTANT = 37
static int DROP_DOMAIN = 47
static int DROP_INDEX = 40
static int DROP_ROLE = 41
static int DROP_SCHEMA = 42
static int DROP_SEQUENCE = 43
static int DROP_SYNONYM = 89
static int DROP_TABLE = 44
static int DROP_TRIGGER = 45
static int DROP_USER = 46
static int DROP_VIEW = 48
static int EXECUTE = 59
static int EXPLAIN = 60
static int EXPLAIN_ANALYZE = 86
static int GRANT = 49
static int INSERT = 61
static int MERGE = 62
static int NO_OPERATION = 63
static int PREPARE = 51
static int PREPARE_COMMIT = 77
static int REPLACE = 63
static int REVOKE = 50
static int ROLLBACK = 72
static int ROLLBACK_TO_SAVEPOINT = 75
static int ROLLBACK_TRANSACTION = 79
static int RUNSCRIPT = 64
static int SAVEPOINT = 74
static int SCRIPT = 65
static int SELECT = 66
static int SET = 67
static int SET_AUTOCOMMIT_FALSE = 70
static int SET_AUTOCOMMIT_TRUE = 69
static int SHUTDOWN = 80
static int SHUTDOWN_COMPACT = 82
static int SHUTDOWN_DEFRAG = 84
static int SHUTDOWN_IMMEDIATELY = 81
static int TRUNCATE_TABLE = 53
static int UNKNOWN = 0
static int UPDATE = 68

UNKNOWN = 0

The type for unknown statement.

ALTER_INDEX_RENAME = 1

The type of a ALTER INDEX RENAME statement.

ALTER_TABLE_ALTER_COLUMN_DEFAULT = 10

The type of a ALTER TABLE ALTER COLUMN SET DEFAULT statement.

ALTER_TABLE_ALTER_COLUMN_CHANGE_TYPE = 11

The type of an ALTER TABLE ALTER COLUMN statement that changes the column data type.

ALTER_TABLE_DROP_COLUMN = 12

The type of a ALTER TABLE DROP COLUMN statement.

ALTER_TABLE_ALTER_COLUMN_SELECTIVITY = 13

The type of a ALTER TABLE ALTER COLUMN SELECTIVITY statement.

ALTER_TABLE_DROP_CONSTRAINT = 14

The type of a ALTER TABLE DROP CONSTRAINT statement.

ALTER_TABLE_RENAME = 15

The type of a ALTER TABLE RENAME statement.

ALTER_TABLE_ALTER_COLUMN_RENAME = 16

The type of a ALTER TABLE ALTER COLUMN RENAME statement.

ALTER_USER_ADMIN = 17

The type of a ALTER USER ADMIN statement.

ALTER_USER_RENAME = 18

The type of a ALTER USER RENAME statement.

ALTER_USER_SET_PASSWORD = 19

The type of a ALTER USER SET PASSWORD statement.

ALTER_SCHEMA_RENAME = 2

The type of a ALTER SCHEMA RENAME statement.

ALTER_VIEW = 20

The type of a ALTER VIEW statement.

ANALYZE = 21

The type of a ANALYZE statement.

CREATE_AGGREGATE = 22

The type of a CREATE AGGREGATE statement.

CREATE_CONSTANT = 23

The type of a CREATE CONSTANT statement.

CREATE_ALIAS = 24

The type of a CREATE ALIAS statement.

CREATE_INDEX = 25

The type of a CREATE INDEX statement.

CREATE_LINKED_TABLE = 26

The type of a CREATE LINKED TABLE statement.

CREATE_ROLE = 27

The type of a CREATE ROLE statement.

CREATE_SCHEMA = 28

The type of a CREATE SCHEMA statement.

CREATE_SEQUENCE = 29

The type of a CREATE SEQUENCE statement.

ALTER_TABLE_ADD_CONSTRAINT_CHECK = 3

The type of a ALTER TABLE ADD CHECK statement.

CREATE_TABLE = 30

The type of a CREATE TABLE statement.

CREATE_TRIGGER = 31

The type of a CREATE TRIGGER statement.

CREATE_USER = 32

The type of a CREATE USER statement.

CREATE_DOMAIN = 33

The type of a CREATE DOMAIN statement.

CREATE_VIEW = 34

The type of a CREATE VIEW statement.

DEALLOCATE = 35

The type of a DEALLOCATE statement.

DROP_AGGREGATE = 36

The type of a DROP AGGREGATE statement.

DROP_CONSTANT = 37

The type of a DROP CONSTANT statement.

DROP_ALL_OBJECTS = 38

The type of a DROP ALL OBJECTS statement.

DROP_ALIAS = 39

The type of a DROP ALIAS statement.

ALTER_TABLE_ADD_CONSTRAINT_UNIQUE = 4

The type of a ALTER TABLE ADD UNIQUE statement.

DROP_INDEX = 40

The type of a DROP INDEX statement.

DROP_ROLE = 41

The type of a DROP ROLE statement.

DROP_SCHEMA = 42

The type of a DROP SCHEMA statement.

DROP_SEQUENCE = 43

The type of a DROP SEQUENCE statement.

DROP_TABLE = 44

The type of a DROP TABLE statement.

DROP_TRIGGER = 45

The type of a DROP TRIGGER statement.

DROP_USER = 46

The type of a DROP USER statement.

DROP_DOMAIN = 47

The type of a DROP DOMAIN statement.

DROP_VIEW = 48

The type of a DROP VIEW statement.

GRANT = 49

The type of a GRANT statement.

ALTER_TABLE_ADD_CONSTRAINT_REFERENTIAL = 5

The type of a ALTER TABLE ADD FOREIGN KEY statement.

REVOKE = 50

The type of a REVOKE statement.

PREPARE = 51

The type of a PREPARE statement.

COMMENT = 52

The type of a COMMENT statement.

TRUNCATE_TABLE = 53

The type of a TRUNCATE TABLE statement.

ALTER_SEQUENCE = 54

The type of a ALTER SEQUENCE statement.

ALTER_TABLE_SET_REFERENTIAL_INTEGRITY = 55

The type of a ALTER TABLE SET REFERENTIAL_INTEGRITY statement.

BACKUP = 56

The type of a BACKUP statement.

CALL = 57

The type of a CALL statement.

DELETE = 58

The type of a DELETE statement.

EXECUTE = 59

The type of a EXECUTE statement.

ALTER_TABLE_ADD_CONSTRAINT_PRIMARY_KEY = 6

The type of a ALTER TABLE ADD PRIMARY KEY statement.

EXPLAIN = 60

The type of a EXPLAIN statement.

INSERT = 61

The type of a INSERT statement.

MERGE = 62

The type of a MERGE statement.

NO_OPERATION = 63

The type of a no operation statement.

REPLACE = 63

The type of a REPLACE statement.

RUNSCRIPT = 64

The type of a RUNSCRIPT statement.

SCRIPT = 65

The type of a SCRIPT statement.

SELECT = 66

The type of a SELECT statement.

SET = 67

The type of a SET statement.

UPDATE = 68

The type of a UPDATE statement.

SET_AUTOCOMMIT_TRUE = 69

The type of a SET AUTOCOMMIT statement.

ALTER_TABLE_ADD_COLUMN = 7

The type of a ALTER TABLE ADD statement.

SET_AUTOCOMMIT_FALSE = 70

The type of a SET AUTOCOMMIT statement.

COMMIT = 71

The type of a COMMIT statement.

ROLLBACK = 72

The type of a ROLLBACK statement.

CHECKPOINT = 73

The type of a CHECKPOINT statement.

SAVEPOINT = 74

The type of a SAVEPOINT statement.

ROLLBACK_TO_SAVEPOINT = 75

The type of a ROLLBACK TO SAVEPOINT statement.

CHECKPOINT_SYNC = 76

The type of a CHECKPOINT SYNC statement.

PREPARE_COMMIT = 77

The type of a PREPARE COMMIT statement.

COMMIT_TRANSACTION = 78

The type of a COMMIT TRANSACTION statement.

ROLLBACK_TRANSACTION = 79

The type of a ROLLBACK TRANSACTION statement.

ALTER_TABLE_ALTER_COLUMN_NOT_NULL = 8

The type of a ALTER TABLE ALTER COLUMN SET NOT NULL statement.

SHUTDOWN = 80

The type of a SHUTDOWN statement.

SHUTDOWN_IMMEDIATELY = 81

The type of a SHUTDOWN IMMEDIATELY statement.

SHUTDOWN_COMPACT = 82

The type of a SHUTDOWN COMPACT statement.

BEGIN = 83

The type of a BEGIN {WORK|TRANSACTION} statement.

SHUTDOWN_DEFRAG = 84

The type of a SHUTDOWN DEFRAG statement.

ALTER_TABLE_RENAME_CONSTRAINT = 85

The type of a ALTER TABLE RENAME CONSTRAINT statement.

EXPLAIN_ANALYZE = 86

The type of a EXPLAIN ANALYZE statement.

ALTER_TABLE_ALTER_COLUMN_VISIBILITY = 87

The type of a ALTER TABLE ALTER COLUMN SET INVISIBLE statement.

CREATE_SYNONYM = 88

The type of a CREATE SYNONYM statement.

DROP_SYNONYM = 89

The type of a DROP SYNONYM statement.

ALTER_TABLE_ALTER_COLUMN_NULL = 9

The type of a ALTER TABLE ALTER COLUMN SET NULL statement.

ALTER_TABLE_ALTER_COLUMN_ON_UPDATE = 90

The type of a ALTER TABLE ALTER COLUMN SET ON UPDATE statement.