Here follows type definitions that are used by more than one function in the ODBC API.
Note
The type TimeOut has the default value infinity, so for instance:
commit(Ref, CommitMode) is the same as commit(Ref, CommitMode, infinity). If the timeout expires the client will exit with the reason timeout.
connection_reference() - as returned by connect/2
time_out() = milliseconds() | infinity
milliseconds() = integer() >= 0
common_reason() = connection_closed | extended_error() | term() - some kind of
explanation of what went wrong
extended_error() = {string(), integer(), Reason} - extended error type with ODBC
and native database error codes, as well as the base reason that would have been
returned had extended_errors not been enabled. string() = list of ASCII characters
col_name() = string() - Name of column in the result set
col_names() - [col_name()] - e.g. a list of the names of the
selected columns in the result set. row() = {value()} - Tuple of column values e.g. one row of the
result set. value() = null | term() - A column value.
rows() = [row()] - A list of rows from the result set.
result_tuple() =
{updated, n_rows()} | {selected, col_names(), rows()} n_rows() = integer() - The number of affected rows for UPDATE,
INSERT, or DELETE queries. For other query types the value
is driver defined, and hence should be ignored. odbc_data_type() = sql_integer | sql_smallint | sql_tinyint |
{sql_decimal, precision(), scale()} |
{sql_numeric, precision(), scale()} |
{sql_char, size()} |
{sql_wchar, size()} |
{sql_varchar, size()} |
{sql_wvarchar, size()}|
{sql_float, precision()} |
{sql_wlongvarchar, size()} |
{sql_float, precision()} |
sql_real | sql_double | sql_bit | atom() precision() = integer()
scale() = integer()
size() = integer()