com.ibm.pdq.runtime.statement
Enum SqlStatementType
- java.lang.Object
java.lang.Enum<SqlStatementType>
com.ibm.pdq.runtime.statement.SqlStatementType
public enum SqlStatementType extends Enum<SqlStatementType>Describes the type of an SQL statement.
Enum Constant Summary
Enum Constant and Description |
---|
ALTER
|
CALL
|
COMMENT
|
COMPOUND
The SQL statement starts with "
BEGIN ".
|
CREATE
|
DECLAREGLOBALTEMPTABLE
The SQL statement starts with "
DECLARE GLOBAL ".
|
DELETE
|
DROP
|
GRANT
|
INSERT
|
LABEL
|
MERGE
|
OTHERSQL
|
QUERY
The SQL statement starts with "
SELECT ", "WITH ".
|
RENAME
|
REVOKE
|
SET
|
SET_METHOD
|
SINGLE_ROW_QUERY
Deprecated.
|
UPDATE
|
VALUES
|
XQUERY
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
getSqlStatementType(String type)
|
|
isDDL(SqlStatementType type)
|
|
isSELECTorVALUES(SqlStatementType type)
To the pureQuery API, this method is equivalent to
QUERY before the changes for RTC 8398.
|
|
isSELECTorVALUESorXQUERY(SqlStatementType type)
To the pureQuery API, this method is equivalent to
isQuery() before the changes for RTC 8398.
|
|
isSELECTorXQUERY(SqlStatementType type)
To the Client Optimizer, this method is equivalent to
isQuery() .
|
|
isSqlSetOrSetMethod()
|
|
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
|
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
Methods inherited from class java.lang.Enum |
---|
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail
ALTER
public static final SqlStatementType ALTER
CALL
public static final SqlStatementType CALL
COMMENT
public static final SqlStatementType COMMENT
COMPOUND
public static final SqlStatementType COMPOUND
CREATE
public static final SqlStatementType CREATE
DECLAREGLOBALTEMPTABLE
public static final SqlStatementType DECLAREGLOBALTEMPTABLE
DECLARE GLOBAL
".
DELETE
public static final SqlStatementType DELETE
DROP
public static final SqlStatementType DROP
GRANT
public static final SqlStatementType GRANT
INSERT
public static final SqlStatementType INSERT
LABEL
public static final SqlStatementType LABEL
MERGE
public static final SqlStatementType MERGE
OTHERSQL
public static final SqlStatementType OTHERSQL
QUERY
public static final SqlStatementType QUERY
SELECT
", "WITH
".
(Note that SQLs that start with "WITH
" also contain "SELECT
". "WITH
"
clauses are optional modifiers on SELECT statements. For example:
http://publib.boulder.ibm.com/infocenter/dzichelp/
v2r2/topic/com.ibm.db2z9.doc.sqlref/src/tpc/db2z_sql_selectstatement.htm
For the pureQuery API, before RTC 8389, this also included SQL statements that started with "VALUES
".
RENAME
public static final SqlStatementType RENAME
REVOKE
public static final SqlStatementType REVOKE
SET
public static final SqlStatementType SET
SET_METHOD
public static final SqlStatementType SET_METHOD
SINGLE_ROW_QUERY
@Deprecated public static final SqlStatementType SINGLE_ROW_QUERY
UPDATE
public static final SqlStatementType UPDATE
VALUES
public static final SqlStatementType VALUES
XQUERY
public static final SqlStatementType XQUERY
Method Detail
getSqlStatementType
public static SqlStatementType getSqlStatementType( String type)
isDDL
public static boolean isDDL(SqlStatementType type)
isSELECTorVALUES
public static boolean isSELECTorVALUES( SqlStatementType type)
QUERY
before the changes for RTC 8398.
Before RTC 8398, QUERY
meant SELECT/VALUES for the API, and it only meant SELECT for CO. In 8398, it
started representing only SELECT for both of them. It is convenient to have a method that can be used in the cases
where the pureQuery API used QUERY
before 8398.
isSELECTorVALUESorXQUERY
public static boolean isSELECTorVALUESorXQUERY( SqlStatementType type)
isQuery()
before the changes for RTC 8398.
isQuery()
check for #QUERY or {@link #XQUERY}. Before RTC 8398, {@link #QUERY} meant SELECT/VALUES
for the API, and it only meant SELECT for CO. In 8398, it started representing only SELECT for both of them. It is
convenient to have a method that can be used in the cases were the API used {@link #isQuery()} before 8398.
isSELECTorXQUERY
public static boolean isSELECTorXQUERY( SqlStatementType type)
isSqlSetOrSetMethod
public boolean isSqlSetOrSetMethod( )
valueOf
public static SqlStatementType valueOf( String name)
name
- the name of the enum constant to be returned. IllegalArgumentException
- if this enum type has no constant
with the specified name NullPointerException
- if the argument is null values
public static SqlStatementType[] values( )
for (SqlStatementType c : SqlStatementType.values()) System.out.println(c);
BEGIN
".