Enum Class FetchPlan

java.lang.Object
java.lang.Enum<FetchPlan>
me.ahoo.cosid.store.jdbc.FetchPlan
All Implemented Interfaces:
Serializable, Comparable<FetchPlan>, Constable

public enum FetchPlan extends Enum<FetchPlan>
How a JDBC store learns the next_value a reserve wrote (options.fetchPlan, R1-jdbc-06; 4.x fetch-plan).
  • Enum Constant Details

    • STATEMENT

      public static final FetchPlan STATEMENT
      From the statement that wrote it, in one round trip: PostgreSQL returning, SQL Server output, MySQL/MariaDB the last_insert_id the 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

      public static final FetchPlan 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

      public static FetchPlan[] 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

      public static FetchPlan valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • of

      public static FetchPlan of(Object value)
      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