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 Detail

      • 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 Detail

      • ValueVarchar

        private ValueVarchar​(java.lang.String value)
    • Method Detail

      • getSQL

        public java.lang.StringBuilder getSQL​(java.lang.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​(java.lang.String s)
        Get or create a VARCHAR value for the given string.
        Parameters:
        s - the string
        Returns:
        the value
      • get

        public static Value get​(java.lang.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