Package me.ahoo.cosid.store.jdbc
Enum Class FetchPlan
- All Implemented Interfaces:
Serializable,Comparable<FetchPlan>,Constable
How a JDBC store learns the
next_value a reserve wrote (options.fetchPlan, R1-jdbc-06; 4.x
fetch-plan).-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionFrom the statement that wrote it, in one round trip: PostgreSQLreturning, SQL Serveroutput, MySQL/MariaDB thelast_insert_idthe statement sets, which the driver returns as its generated key.In one transaction: an update of the row, then a read of it, which the row lock keeps exact. -
Method Summary
Modifier and TypeMethodDescriptionstatic FetchPlanThe plan an option names, ignoring case and-/_.static FetchPlanReturns the enum constant of this class with the specified name.static FetchPlan[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
STATEMENT
From the statement that wrote it, in one round trip: PostgreSQLreturning, SQL Serveroutput, MySQL/MariaDB thelast_insert_idthe statement sets, which the driver returns as its generated key. The default. A generated key the statement did not set (an SQL proxy that rewrites or drops it) fails the reserve when it is implausible; when the key is missing, the store never asks the connection for it. -
TRANSACTION
In one transaction: an update of the row, then a read of it, which the row lock keeps exact. One more round trip, but nothing depends on connection state, so it works behind SQL proxies and read-write splitting, which keep a transaction on the primary.
-
-
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
-
of
The plan an option names, ignoring case and-/_.- Parameters:
value- the option value; null for the default- Returns:
- the plan
- Throws:
IllegalArgumentException- if the value names no plan
-