odbc_type(+Connection,
?TypeSpec, ?Facet)Query the types supported by the data source. TypeSpec is
either an integer type-id, the name of an ODBC SQL type or the constant
all_types
to enumerate all known types. This predicate
calls
SQLGetTypeInfo() and its facet names are derived from the
specification of this ODBC function:
- name(Name)
- Name used by the data-source. Use this in CREATE statements
- data_type(DataType)
- Numeric identifier of the type
- precision(Precision)
- When available, maximum precision of the type.
- literal_prefix(Prefix)
- When available, prefix for literal representation.
- literal_suffix(Suffix)
- When available, suffix for literal representation.
- create_params(CreateParams)
- When available, arguments needed to create the type.
- nullable(Bool)
- Whether the type can be
NULL
. May be unknown
- case_sensitive(Bool)
- Whether values for this type are case-sensitive.
- searchable(Searchable)
- Whether the type can be searched. Values are
false
,
true
, like_only
or all_except_like
.
- unsigned(Bool)
- When available, whether the value is signed. Please note that SWI-Prolog
does not provide unsigned integral values.
- money(Bool)
- Whether the type represents money.
- auto_increment(Bool)
- When available, whether the type can be auto-incremented.
- local_name(LocalName)
- Name of the type in local language.
- minimum_scale(MinScale)
- Minimum scale of the type.
- maximum_scale(MaxScale)
- Maximum scale of the type.