MySQL NDB Cluster API Developer Guide

2.3.11 The Index Class


This section provides a reference to the Index class and its public members.

Parent class.  NdbDictionary

Child classes.  None

Description.  This class represents an index on an NDB Cluster table column. It is a descendant of the NdbDictionary class, using the Object class.

Methods.  The following table lists the public methods of Index and the purpose or use of each method:

Table 2.25 Index class methods and descriptions

Name Description
Index() Class constructor
~Index() Destructor
addColumn() Adds a Column object to the index
addColumnName() Adds a column by name to the index
addColumnNames() Adds multiple columns by name to the index
getColumn() Gets a column making up (part of) the index
getLogging() Checks whether the index is logged to disk
getName() Gets the name of the index
getNoOfColumns() Gets the number of columns belonging to the index
getObjectStatus() Gets the index object status
getObjectVersion() Gets the index object status
getObjectId() Gets the index object ID
getTable() Gets the name of the table being indexed
getType() Gets the index type
setLogging() Enable/disable logging of the index to disk
setName() Sets the name of the index
setTable() Sets the name of the table to be indexed
setType() Set the index type

Types.  Index has one public type, the Type type.


If you create or change indexes using the NDB API, these modifications cannot be seen by MySQL. The only exception to this is renaming the index using Index::setName().