IndexDesc & db::IndexDescSet::add_index ( const NameChar *  name,
IndexMode  index_mode 
)

Add an index.

Parameters:
name Name use to identify the index in Table::set_sort_order and when modifying the schema.
index_mode An index can be DB_UNIQUE or DB_MULTISET. A unique index prevents duplicate rows which contain identical values for all fields in the index. A multiset index does not impose this restriction.
Returns:
A reference to the index description. Use IndexDesc::add_field to add indexed columns to the returned class.


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