An object of this class describes TABLE' s or RECORDSET's column. At the same time it is intended to store values of some predefined types: INTEGER, REAL, DOUBLE, BOOLEAN, CHARACTER, STRING, DATETIME or BLOB.
The features of this class can be divided into three logic groups. The column attributes - name, table_name, type, is_required, etc. comprise the first group.
Second group is presented by features for storing and retrieving of a value and its current state: put, item, set_null and is_null. Besides there are some special features plus, plus_real, minus_double, etc., which simplify the code in some typical situations.
Features of the third group are to_integer, to_string, etc., that allow easy and elegant conversion among data types. For example, two following examples do the same - obtain an integer value from the field field:
field: FIELD A. ir: INTEGER_REF n: INTEGER ... ir ?= field.item n := ir.item B. n: INTEGER ... n := field.to_integer
A cross type conversion is also permitted. For example, having the INTEGER field you can expose the value via to_string, to_boolean, to_real, to_double and to_character, along with to_integer.
Usage of this class is shown in examples for RECORDSET and DB_TABLE.