Data Types

The Virtual DataPort catalog includes a group of predefined data types. These types can be divided into two groups: basic types and compound types.

Virtual DataPort data types
<Virtual DataPort data type> ::=
      blob
    | boolean
    | date
    | decimal
    | double
    | float
    | int
    | intervaldaysecond
    | intervalyearmonth
    | localdate
    | long
    | text
    | time
    | timestamp
    | timestamptz
    | xml
    | <Virtual DataPort compound data type>

<Virtual DataPort compound data type> ::=
      array
    | register

The basic data types supported are:

  • int. Integer number. The maximum value is +2^31-1 (2,147,483,647) and the minimum, -2^31 (-2,147,483,648).
  • long. Long integer number. The maximum value is 2 63 - 1 (9,223,372,036,854,775,807) and the minimum, -2 63 (-9,223,372,036,854,775,808).
  • float. Single-precision 32-bit IEEE 754 floating point. Its range of values is explained in the section Floating-Point Types, Formats, and Values of the Java Language Specification.
  • double. Double-precision 64-bit IEEE 754 floating point. Its range of values is explained in the section Floating-Point Types, Formats, and Values of the Java Language Specification.
  • decimal. Signed decimal number with arbitrary-precision.
  • boolean. Logical value: true or false or unknown (null).
  • text. Character string.
  • date (deprecated). Timestamp with a time zone displacement. Maintained for compatibility reasons.
  • localdate. Date without a time zone (year, month and day)
  • time. Time without a time zone (hour, minute, second and millisecond).
  • timestamp. Timestamp without a time zone (year, month, day, hour, minute, second and millisecond).
  • timestamptz. Timestamp with a time zone displacement.
  • intervaldaysecond. Duration of a period of time with a precision that can include any set of contiguous fields other than YEAR or MONTH.
  • intervalyearmonth. Duration of a period of time with a precision that includes a YEAR field or a MONTH field, or both.
  • blob. Binary value. These values cannot take part in query conditions.
  • xml. XML document or XML fragment.

The next section (Data Types for Dates, Timestamps and Intervals) explains the datetime types in detail.

In Virtual DataPort you can define compound data types to model hierarchical data such as the data obtained from SOAP Web services or XML documents. The section Defining a Data Type explains how to define compound types.

The compound data types are:

  • register. Compound data with an internal and heterogeneous structure, i.e. the fields into which the data are subdivided are not all the same type.
  • array. List of elements of the same register type.