Enum Class BinaryWidthSpelling

java.lang.Object
java.lang.Enum<BinaryWidthSpelling>
dev.frostlake.types.BinaryWidthSpelling
All Implemented Interfaces:
Serializable, Comparable<BinaryWidthSpelling>, Constable

public enum BinaryWidthSpelling extends Enum<BinaryWidthSpelling>
How a BINARY's width is spelled where the plan names the type — SYSTEM$TYPEOF and the argument-type refusals (live-verified):
                                                   SYSTEM$TYPEOF         refusal
   DECLARED  a column, X'..', CAST(x AS BINARY(n))  BINARY(n)             BINARY(n)
   UNSIZED   TO_BINARY, CAST(x AS BINARY), DECRYPT  BINARY                BINARY(67108864)
   MAXIMUM   COALESCE(b5, TO_BINARY(s))             BINARY(67108864)      BINARY(67108864)
 

The spelling is carried beside the width a binary is held at, which it never changes.

  • Enum Constant Details

    • DECLARED

      public static final BinaryWidthSpelling DECLARED
      Sized at its own width.
    • UNSIZED

      public static final BinaryWidthSpelling UNSIZED
      Never sized by the plan: the result of a conversion, a cast to a bare BINARY, a SQL UDF.
    • MAXIMUM

      public static final BinaryWidthSpelling MAXIMUM
      Sized at the 64MB maximum: a fold that met an unsized branch after a sized one.
  • Method Details

    • values

      public static BinaryWidthSpelling[] 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 BinaryWidthSpelling 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
    • meeting

      public BinaryWidthSpelling meeting(BinaryWidthSpelling later)
      The spelling a fold takes where a branch spelled later follows branches spelled this one. The lead decides: an unsized lead keeps the fold unsized, and a sized lead meeting anything unsized takes it to the maximum — live, IFF(c, TO_BINARY(s), X'00') is bare BINARY while IFF(c, X'00', TO_BINARY(s)) is BINARY(67108864).
      Parameters:
      later - the following branch's spelling
      Returns:
      the folded spelling