Documentation of 'org.hsqldb.types.BitType' Java class
BitType
org.hsqldb.types

Class BitType

  • All Implemented Interfaces:
    java.lang.Cloneable, SchemaObject


    public final class BitType
    extends BinaryType
    Operations allowed on BIT strings are CONCAT, SUBSTRING, POSITION, BIT_LENGTH and OCTECT_LENGTH.

    BIT values can be cast to BINARY and vice-versa. In casts, BIT values are converted to their counterpart BINARY values by treating each set of 8 bits or less as a signle byte. The first bit of a BIT string is treated as the most significan bit of the resutling byte value. Binary values are converted by treating the bits in the sequence of bytes as sequence of bits in the BIT string

    Since:
    1.9.0
    • Constructor Detail

      • BitType

        public BitType(int type,
                       long precision)
    • Method Detail

      • getJDBCTypeCode

        public int getJDBCTypeCode()
        Description copied from class: Type
        Returns the JDBC type number of type, if it exists, otherwise the HSQLDB / SQL type.
        Overrides:
        getJDBCTypeCode in class BinaryType
      • getJDBCClassName

        public java.lang.String getJDBCClassName()
        Description copied from class: Type
        Returns the JDBC class name of type, if it exists, otherwise the HSQLDB class name.
        Overrides:
        getJDBCClassName in class BinaryType
      • getSQLGenericTypeCode

        public int getSQLGenericTypeCode()
        Description copied from class: Type
        Returns the generic SQL CLI type number of type, if it exists, otherwise the HSQLDB type. The generic type is returned for DATETIME and INTERVAL types.
        Overrides:
        getSQLGenericTypeCode in class Type
      • getNameString

        public java.lang.String getNameString()
        Description copied from class: Type
        Returns the name of the type
        Overrides:
        getNameString in class BinaryType
      • getDefinition

        public java.lang.String getDefinition()
        Description copied from class: Type
        Returns the full definition of the type, including parameters
        Overrides:
        getDefinition in class BinaryType
      • isBitType

        public boolean isBitType()
        Overrides:
        isBitType in class Type
      • getAggregateType

        public Type getAggregateType(Type other)
        Description copied from class: Type
        Common type used in comparison opertions. other must be comparable with this.
        Overrides:
        getAggregateType in class BinaryType
      • compare

        public int compare(Session session,
                           java.lang.Object a,
                           java.lang.Object b)
        Overrides:
        compare in class BinaryType
      • castToType

        public java.lang.Object castToType(SessionInterface session,
                                           java.lang.Object a,
                                           Type otherType)
        Description copied from class: Type
        Explicit casts are handled by this method. SQL standard 6.12 rules for enforcement of size, precision and scale are implemented. For CHARACTER values, it performs truncation in all cases of long strings.
        Overrides:
        castToType in class BinaryType
      • convertToType

        public java.lang.Object convertToType(SessionInterface session,
                                              java.lang.Object a,
                                              Type otherType)
        Description copied from class: Type
        Same as castToType except for CHARACTER values. Perform string truncation of trailing spaces only. For other long strings, it raises an exception.
        Overrides:
        convertToType in class BinaryType
      • convertToDefaultType

        public java.lang.Object convertToDefaultType(SessionInterface session,
                                                     java.lang.Object a)
        Description copied from class: Type
        Converts the object to the given type without limit checks. Used for JDBC writes.
        Overrides:
        convertToDefaultType in class BinaryType
      • convertToString

        public java.lang.String convertToString(java.lang.Object a)
        Overrides:
        convertToString in class BinaryType
      • concat

        public java.lang.Object concat(Session session,
                                       java.lang.Object a,
                                       java.lang.Object b)
        Overrides:
        concat in class BinaryType
      • getBitType

        public static BinaryType getBitType(int type,
                                            long precision)

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.