Class VarcharType

All Implemented Interfaces:
Serializable, scala.Equals, scala.Product

public class VarcharType extends StringType implements scala.Product, Serializable
A data type representing variable-length character strings with a specified maximum length.

param: length The maximum length of the varchar string (must be non-negative) param: collation Optional collation ID for string comparison and sorting. If None, uses UTF8_BINARY_COLLATION_ID. The reason for using an Option is to be able to see in the analyzer whether the collation was explicitly specified or not.

See Also:
  • Method Details

    • apply

      public static VarcharType apply(int length)
    • apply

      public static VarcharType apply(int length, String collationName)
    • apply

      public static VarcharType apply(int length, int collationId)
    • length

      public int length()
    • collation

      public scala.Option<Object> collation()
    • defaultSize

      public int defaultSize()
      Description copied from class: StringType
      The default size of a value of the StringType is 20 bytes.
      Overrides:
      defaultSize in class StringType
      Returns:
      (undocumented)
    • typeName

      public String typeName()
      Description copied from class: StringType
      Type name that is shown to the customer. If this is an UTF8_BINARY collation output is string due to backwards compatibility.
      Overrides:
      typeName in class StringType
      Returns:
      (undocumented)
    • toString

      public String toString()
      Overrides:
      toString in class StringType
    • toStringType

      public StringType toStringType()