Data types in xGT

BOOLEAN

The BOOLEAN type supports the storage of two values: true or false. Use the case insensitve keywords TRUE or FALSE or the integer values 1 or 0 to assign a BOOLEAN.

INTEGER

The INTEGER type holds signed numeric values. It stores any value between the range of -263 and 263 - 1. Attempting to assign values outside this range causes an error.

FLOAT

The FLOAT type holds single-precision floating-point values with up to seven decimal digits of precision. Attempting to assign values with greater precision will result in an error. The case-insensitive string NaN is also an acceptable value. Any other non decimal characters will result in an error.

DATE

The DATE type holds a date composed of a day, month, and year. The expected format for a DATE is YYYY-MM-DD. I.e. a valid DATE would be 2018-12-20. Assigning a DATE property with a DATETIME value in the form of YYYY-MM-DDTHH:MM:SS will result in the DATETIME being downcast and ignoring the time fields. Attempting to assign any other type will result in an error.

TIME

The TIME type holds a time composed of hours, minutes, seconds, and (optionally) microseconds. The expected format for a TIME is HH:MM:SS. I.e. a valid TIME would be 06:10:50. Optionally, microseconds can be included where the expected format is HH:MM:SS.μμμμμμ. I.e. a valid TIME with microseconds would be 06:10:50.000006. Attempting to assign any other type will result in an error.

DATETIME

The DATETIME type holds a combination of a date and time composed of a day, month, year, hours, minutes, and seconds. The expected format for a DATETIME is YYYY-MM-DDTHH:MM:SS. I.e. a valid DATETIME would be 2018-12-20T06:10:50. Assigning a DATE to a DATETIME will result in the DATE being "promoted" to a DATETIME with zeroes for the time fields. Attempting to assign any other type will result in an error.

IPADDRESS

The IPADDRESS type holds an IPv4 address. The expected format of an IPADDRESS is XXX.XXX.XXX.XXX. I.e. a valid IPADDRESS would be 172.16.254.1. Assigning any other type (including IPv6 addresses) will result in an error.

TEXT

The TEXT type holds a string of UTF-8 encoded unicode characters.