A column in the database table is described by its type and further data according to the type. These data are passed in the variant structure t_specif:
union t_specif { tobjnum domain_num; struct { sig8 scale; uns8 precision; }; struct { uns16 length; uns8 charset; uns8 ignore_case : 1; uns8 wide_char : 2; }; };
The cd_Enum_attributes_ex and cd_Attribute_info_ex function return this structure and the SQL_host_execute or SQL_host_prepare require this structure. The individual items of this structure have the following meaning:
Item | Usage for types | Meaning |
domain_num | Domains | Domain type object number |
scale | Accurate numeric types | Number of decimal places |
precision | Accurate numeric types | Approximate number of valid digits |
length | Character and binary strings with limited length | Length (maximum length) |
charset | Character strings | Charset code |
ignore_case | Character strings | A flag specifying whether to keep in mind letter case when comparing |
wide_char | Character strings | 16-bit characters flag (unicode, i.e. NCHAR type) |