Package net.snowflake.client.core
Enum SFStatementType
- java.lang.Object
-
- java.lang.Enum<SFStatementType>
-
- net.snowflake.client.core.SFStatementType
-
- All Implemented Interfaces:
Serializable,Comparable<SFStatementType>
public enum SFStatementType extends Enum<SFStatementType>
Used to check if the statementType belongs to DDL or DML The enum of each statement type is defined in com.snowflake.core.Statement.java
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALTER_SESSIONCOPYDDLData Definition LanguageDELETEDESCRIBEDMLData Manipulation LanguageGETStage-related commands (other than LIST)INSERTLISTMERGEMULTI_INSERTPUTRECLUSTERREMOVESCLSystem Command Language (USE, DESCRIBE etc)SELECTSHOWTCLTransaction Command Language (COMMIT, ROLLBACK)UNKNOWNBy default we set query will generate result set, which means executeUpdate will throw exception.UNLOADUPDATEUSEUSE_DATABASEUSE_SCHEMAUSE_WAREHOUSE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetStatementTypeId()booleanisDDL()booleanisDML()booleanisGenerateResultSet()booleanisSCL()booleanisSelect()booleanisTCL()static SFStatementTypelookUpTypeById(long id)static SFStatementTypevalueOf(String name)Returns the enum constant of this type with the specified name.static SFStatementType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNKNOWN
public static final SFStatementType UNKNOWN
By default we set query will generate result set, which means executeUpdate will throw exception. In that way, we have a clear control of what statements can be executed by executeUpdate
-
SELECT
public static final SFStatementType SELECT
-
DML
public static final SFStatementType DML
Data Manipulation Language
-
INSERT
public static final SFStatementType INSERT
-
UPDATE
public static final SFStatementType UPDATE
-
DELETE
public static final SFStatementType DELETE
-
MERGE
public static final SFStatementType MERGE
-
MULTI_INSERT
public static final SFStatementType MULTI_INSERT
-
COPY
public static final SFStatementType COPY
-
UNLOAD
public static final SFStatementType UNLOAD
-
RECLUSTER
public static final SFStatementType RECLUSTER
-
SCL
public static final SFStatementType SCL
System Command Language (USE, DESCRIBE etc)
-
ALTER_SESSION
public static final SFStatementType ALTER_SESSION
-
USE
public static final SFStatementType USE
-
USE_DATABASE
public static final SFStatementType USE_DATABASE
-
USE_SCHEMA
public static final SFStatementType USE_SCHEMA
-
USE_WAREHOUSE
public static final SFStatementType USE_WAREHOUSE
-
SHOW
public static final SFStatementType SHOW
-
DESCRIBE
public static final SFStatementType DESCRIBE
-
LIST
public static final SFStatementType LIST
-
TCL
public static final SFStatementType TCL
Transaction Command Language (COMMIT, ROLLBACK)
-
DDL
public static final SFStatementType DDL
Data Definition Language
-
GET
public static final SFStatementType GET
Stage-related commands (other than LIST)
-
PUT
public static final SFStatementType PUT
-
REMOVE
public static final SFStatementType REMOVE
-
-
Method Detail
-
values
public static SFStatementType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (SFStatementType c : SFStatementType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SFStatementType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
lookUpTypeById
public static SFStatementType lookUpTypeById(long id)
-
getStatementTypeId
public long getStatementTypeId()
-
isDDL
public boolean isDDL()
-
isDML
public boolean isDML()
-
isTCL
public boolean isTCL()
-
isSCL
public boolean isSCL()
-
isGenerateResultSet
public boolean isGenerateResultSet()
-
isSelect
public boolean isSelect()
-
-