Package io.github.jdbcx
Enum QueryMode
- All Implemented Interfaces:
Serializable,Comparable<QueryMode>,java.lang.constant.Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionExecutes a query asynchronously.Executes batch queries.Executes a query immediately and waits the result.Executes a mutation immediately and waits for the result.Submits a query and gets redirected to retrieve the results.Submits a query for later execution. -
Method Summary
Modifier and TypeMethodDescriptioncharcode()Gets a single character code representing the query mode.static QueryModefromCode(char code) Gets query mode based on the given code.static QueryModeGets query mode based on the given code.static QueryModeGets query mode based on given path.static QueryModeGets query mode based on given path.static QueryModeGets query mode based on given string, which could be a single charactercode,pathorname.path()Gets semantic relative path used in constructing the query URL.static QueryModeReturns the enum constant of this type with the specified name.static QueryMode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
SUBMIT
Submits a query for later execution. -
REDIRECT
Submits a query and gets redirected to retrieve the results. -
ASYNC
Executes a query asynchronously. -
DIRECT
Executes a query immediately and waits the result. -
MUTATION
Executes a mutation immediately and waits for the result. -
BATCH
Executes batch queries.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-
code
public char code()Gets a single character code representing the query mode.- Returns:
- single character code
-
path
Gets semantic relative path used in constructing the query URL.- Returns:
- non-empty semantic relative path
-
fromPath
Gets query mode based on given path.- Parameters:
path- path- Returns:
- non-null query mode, defaults to
SUBMIT
-
fromPath
Gets query mode based on given path.- Parameters:
path- pathdefaultMode- default mode- Returns:
- query mode
-
fromCode
Gets query mode based on the given code.- Parameters:
code- code- Returns:
- non-null query mode, defaults to
SUBMIT
-
fromCode
Gets query mode based on the given code.- Parameters:
code- codedefaultMode- default mode- Returns:
- query mode
-
of
Gets query mode based on given string, which could be a single charactercode,pathorname.- Parameters:
str- single character, path or name- Returns:
- non-null query mode, defaults to
SUBMIT
-