Package org.h2.value

Class ValueVarchar

All Implemented Interfaces:
HasSQL, Typed

public final class ValueVarchar extends ValueStringBase
Implementation of the CHARACTER VARYING data type.
  • Field Details

    • EMPTY

      public static final ValueVarchar EMPTY
      Empty string. Should not be used in places where empty string can be treated as NULL depending on database mode.
  • Constructor Details

    • ValueVarchar

      private ValueVarchar(String value)
  • Method Details

    • getSQL

      public StringBuilder getSQL(StringBuilder builder, int sqlFlags)
      Description copied from interface: HasSQL
      Appends the SQL statement of this object to the specified builder.
      Parameters:
      builder - string builder
      sqlFlags - formatting flags
      Returns:
      the specified string builder
    • getValueType

      public int getValueType()
      Description copied from class: Value
      Get the value type.
      Specified by:
      getValueType in class Value
      Returns:
      the value type
    • get

      public static Value get(String s)
      Get or create a VARCHAR value for the given string.
      Parameters:
      s - the string
      Returns:
      the value
    • get

      public static Value get(String s, CastDataProvider provider)
      Get or create a VARCHAR value for the given string.
      Parameters:
      s - the string
      provider - the cast information provider, or null
      Returns:
      the value