When reading data from the database the following datatypes are supported, with conversion to the corresponding prolog datatypes.
SQL_CHAR, SQL_VARCHAR etc.SQL_BIT0 for false, or 1 for true.
SQL_INTEGER, SQL_TINYINT, SQL_SMALLINT, etc.SQL_REAL, SQL_DOUBLE, SQL_FLOATSQL_DATEdate(Year, Month, DayOfMonth), with one-based
integer arguments. E.g. date(2012,10,22) means October
22, 2012.
SQL_TIMEtime(Hour, Minute, Second) with one-based integer
arguments. E.g. time(22,11,5) means eleven minutes and
five seconds past ten pm.
SQL_TIMESTAMPtimestamp(Year, Month, Day, Hour, Minute, Second,
Fraction) where the arguments have the same meaning as for
SQL_TIME and SQL_TIMESTAMP and Fraction
means fractional nanoseconds past, as an integer.
null.
SQL_BINARY and other binary typesSQL_INTERVAL_HOUR and other interval typesSQL_UTCTIME and SQL_UTCDATETIMESQL_CHAR must be quoted in Prolog, e.g. 'SQL_CHAR'.