IndexSchema interface

Specifies the schema of an index and provides constants useful for querying system tables.

Syntax
public IndexSchema
Remarks

An object supporting this interface is returned by the TableSchema.createIndex(String), TableSchema.createPrimaryIndex(String), TableSchema.createUniqueIndex(String) and TableSchema.createUniqueKey(String) methods. For a description of the various index types, see TableSchema interface.

All indexes must have at least one column.

Indexes sort by the first column added to the index, then by the second column (if specified), etc.

Indexes may not contain LONGBINARY or LONGVARCHAR type columns.

The following example demonstrates the creation of a two column index.

// Assumes a valid TableSchema object table_schema on
// a table with columns A and B.
IndexSchema index_schema;
index_schema = table_schema.createIndex("AthenBreversed");
index_schema.addColumn("A", IndexSchema.ASCENDING);
index_schema.addColumn("B", IndexSchema.DESCENDING);
Members

All members of IndexSchema, including all inherited members.


ASCENDING variable
DESCENDING variable
PERSISTENT variable
PRIMARY_INDEX variable
UNIQUE_INDEX variable
UNIQUE_KEY variable
addColumn function