indexing
     description: "Description of a database table column"
     date: "$Date$"
     revision: "$Revision$"

class interface
     COLUMNS [G -> DATABASE create default_create end]

feature -- Access

     db_spec: DATABASE
                 -- Handle to actual database
                 -- (from HANDLE_SPEC)
           ensure -- from HANDLE_SPEC
                 not_void: Result /= void
     
feature -- Status report

     buffer_length: INTEGER
                 -- Column length in bytes
                 -- Was declared in COLUMNS as synonym of data_length and length.

     column_id: INTEGER
                 -- Column identification number (number of column in table)

     column_name: STRING
                 -- Column name

     column_nulls: STRING
                 -- 'Y' if the column can contain null values, 'N' if the column can't contain null values

     column_size: INTEGER
                 -- precision of the Column
                 -- Was declared in COLUMNS as synonym of data_precision and precision.

     column_typename: STRING

     creation_date: DATE_TIME
                 -- Table creation date

     data_default: STRING
                 -- Default field value

     data_length: INTEGER
                 -- Column length in bytes
                 -- Was declared in COLUMNS as synonym of length and buffer_length.

     data_precision: INTEGER
                 -- precision of the Column
                 -- Was declared in COLUMNS as synonym of precision and column_size.

     data_scale: INTEGER
                 -- the scale of the column
                 -- Was declared in COLUMNS as synonym of scale and decimal_digits.

     data_type: INTEGER
                 -- Data type of a column. Ingres has the following data type code(negative is for nullable field):
                 -- integer -30/30
                 -- float -31/31
                 -- c -32/32
                 -- text -37/37
                 -- date -3/3
                 -- money -5/5
                 -- char -20/20
                 -- varchar -21/21
                 -- table_key -12/12
                 -- object_key -11/11

     decimal_digits: INTEGER
                 -- the scale of the column
                 -- Was declared in COLUMNS as synonym of data_scale and scale.

     default_length: INTEGER
                 -- Length of default value for a column

     density: INTEGER
                 -- Oracle V7 add ons.

     duplicate: like Current
                 -- Duplicate copy of Current

     eiffel_type: INTEGER
                 -- Eiffel type code mapped to Ingres type data_type

     high_value: INTEGER
                 -- Oracle V7 add ons.

     length: INTEGER
                 -- Column length in bytes
                 -- Was declared in COLUMNS as synonym of data_length and buffer_length.

     low_value: INTEGER
                 -- Oracle V7 add ons.

     nullable: INTEGER
                 -- if the column can get NULL value

     num_distinct: INTEGER
                 -- Oracle V7 add ons.

     num_prec_radix: INTEGER
                 -- the radix of the Column
                 -- Was declared in COLUMNS as synonym of radix.

     owner: STRING
                 -- Owner id of table of name table_name
                 -- Was declared in COLUMNS as synonym of table_owner and table_schem.

     owner_id: INTEGER
                 -- Owner id of table of name table_name

     precision: INTEGER
                 -- precision of the Column
                 -- Was declared in COLUMNS as synonym of data_precision and column_size.

     radix: INTEGER
                 -- the radix of the Column
                 -- Was declared in COLUMNS as synonym of num_prec_radix.

     scale: INTEGER
                 -- the scale of the column
                 -- Was declared in COLUMNS as synonym of data_scale and decimal_digits.

     status: INTEGER
                 --  Flag to check whether a column field can be null

     table_cat: STRING
                 -- Qualifier of the table in which the column belongs
                 -- Was declared in COLUMNS as synonym of table_qualifier.

     table_id: INTEGER
                 -- Table identification number

     table_name: STRING
                 -- Table name

     table_owner: STRING
                 -- Owner id of table of name table_name
                 -- Was declared in COLUMNS as synonym of owner and table_schem.

     table_qualifier: STRING
                 -- Qualifier of the table in which the column belongs
                 -- Was declared in COLUMNS as synonym of table_cat.

     table_schem: STRING
                 -- Owner id of table of name table_name
                 -- Was declared in COLUMNS as synonym of owner and table_owner.

     table_type: STRING
                 -- Table type

     type_name: STRING
                 -- type name in ODBC
     
feature -- Status setting

     set_all (col_id, dat_type, dat_len, sca, rad, prec, nulable, def_len, num_dist, low_val, high_val, dens, own_id, tb_id, stat: INTEGER; dat_def, qualifier, own, tab_name, tab_type, col_name, col_nulls, col_typename: STRING; creat_date: DATE_TIME)
                 -- Set attributes with input parameter values.
     
feature -- Removal

     clear_all
                 -- Reset all attributes to default values.
     
feature -- Conversion

     boolean_type_database: INTEGER
                 -- Boolean type code in Ingres
                 -- (from TYPES)

     character_type_database: INTEGER
                 -- Character type code in Ingres
                 -- (from TYPES)

     date_type_database: INTEGER
                 -- Datetime type code in Ingres
                 -- (from TYPES)

     float_type_database: INTEGER
                 -- Double type code in Ingres
                 -- (from TYPES)

     integer_type_database: INTEGER
                 -- Integer type code in Ingres
                 -- (from TYPES)

     real_type_database: INTEGER
                 -- Real type code in Ingres
                 -- (from TYPES)

     string_type_database: INTEGER
                 -- String type code in Ingres
                 -- (from TYPES)
     
invariant

           -- from ANY
     reflexive_equality: standard_is_equal (Current)
     reflexive_conformance: conforms_to (Current)

end -- class COLUMNS