When reading data from the database the following datatypes are supported, with conversion to the corresponding prolog datatypes.
SQL_CHAR
, SQL_VARCHAR
etc.SQL_BIT
0
for false, or 1
for true.
SQL_INTEGER
, SQL_TINYINT
, SQL_SMALLINT
, etc.SQL_REAL
, SQL_DOUBLE
, SQL_FLOAT
SQL_DATE
date(Year, Month, DayOfMonth)
, with one-based
integer arguments. E.g. date(2012,10,22)
means October
22, 2012.
SQL_TIME
time(Hour, Minute, Second)
with one-based integer
arguments. E.g. time(22,11,5)
means eleven minutes and
five seconds past ten pm.
SQL_TIMESTAMP
timestamp(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_UTCDATETIME
SQL_CHAR
must be quoted in Prolog, e.g. 'SQL_CHAR'
.