Package me.axolotl.api.sql.enumerate
Enum Class SQLStatus
- All Implemented Interfaces:
Serializable,Comparable<SQLStatus>,Constable
SQLStatus枚舉表示SQL連接狀態的各種狀態。
- Since:
- 2024-02-22
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionSQL連接已建立。目前正在連接到SQL。SQL連接已斷開。目前正在從SQL斷開連接。SQL連接中發生錯誤。SQL連接正在處理中。未知的SQL狀態。 -
Method Summary
Modifier and TypeMethodDescriptionstatic SQLStatusgetByLevel(int level) 根據指定的級別獲取與之對應的SQLStatus枚舉常量。static SQLStatusReturns the enum constant of this class with the specified name.static SQLStatus[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNKNOWN
未知的SQL狀態。 -
CONNECTING
目前正在連接到SQL。 -
CONNECTED
SQL連接已建立。 -
PROCESSING
SQL連接正在處理中。 -
DISCONNECTING
目前正在從SQL斷開連接。 -
DISCONNECTED
SQL連接已斷開。 -
ERROR
SQL連接中發生錯誤。
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
getByLevel
根據指定的級別獲取與之對應的SQLStatus枚舉常量。- Parameters:
level- 表示狀態的級別- Returns:
- 與指定級別相關聯的SQLStatus枚舉常量,如果找不到匹配項則返回UNKNOWN
-