int db::Database::describe_table ( const NameChar *  table_name,
FieldDescSet fields,
IndexDescSet indexes 
)

Retrieve the description of a table's fields and indexes.

This function retrieves the FieldDescSet and IndexDescSet that describe a table's fields and indexes. This information is stored in the fields and indexes arguments.

Parameters:
table_name Table for which to retrieve the description. (required)
fields Destination for a description of the table's fields. (required)
indexes Destination for a description of the table's indexes.
Returns:
  • DB_NOERROR When successful.
  • DB_EINVAL Caused by: table_name is null, fields is null, indexes is null.
  • DB_ENAME table_name is not in a valid format. Valid name is letter(aA-zZ)+zero or more aplhanumeric characters. Underscore is considered a valid character.
  • DB_ESTATE Database has not been opened.
This function can be used to dynamically alter a table's schema. First call describe_table to retrieve a FieldDescSet and IndexDescSet. Modify these objects and then update the table schema with update_table.

See also:
update_table, create_table, Table::field_desc, Table::index_desc


Copyright © 2005-2008 ITTIA®. All rights reserved.