NdbDictionary::NdbDictionary::Index Class Reference

Represents an index in an NDB Cluster. More...

#include <NdbDictionary.hpp>

Inheritance diagram for NdbDictionary::NdbDictionary::Index:

NdbDictionary::NdbDictionary::Object

List of all members.

Public Member Functions

Index creation
These methods should normally not be used in an application as the result will not be visible from the MySQL Server

Getting Index properties


Detailed Description

Represents an index in an NDB Cluster.

Member Enumeration Documentation

Represents type of index

Enumerator:
Undefined  Undefined object type (initial value).
UniqueHashIndex  Unique un-ordered hash index (only one currently supported)
OrderedIndex  Non-unique ordered index.

Reimplemented from NdbDictionary::NdbDictionary::Object.


Constructor & Destructor Documentation

NdbDictionary::NdbDictionary::Index::Index ( const char *  name = ""  ) 

Constructor

Parameters:
name Name of index


Member Function Documentation

int NdbDictionary::NdbDictionary::Index::addColumn ( const Column c  ) 

Add a column to the index definition Note that the order of columns will be in the order they are added (only matters for ordered indexes).

int NdbDictionary::NdbDictionary::Index::addColumnName ( const char *  name  ) 

Add a column name to the index definition Note that the order of indexes will be in the order they are added (only matters for ordered indexes).

int NdbDictionary::NdbDictionary::Index::addColumnNames ( unsigned  noOfNames,
const char **  names 
)

Add several column names to the index definition Note that the order of indexes will be in the order they are added (only matters for ordered indexes).

const Column* NdbDictionary::NdbDictionary::Index::getColumn ( unsigned  no  )  const

Get a specific column in the index

bool NdbDictionary::NdbDictionary::Index::getLogging (  )  const

Check if index is set to be stored on disk

Returns:
if true then logging id enabled
Note:
Non-logged indexes are rebuilt at system restart.

Ordered index does not currently support logging.

const char* NdbDictionary::NdbDictionary::Index::getName (  )  const

Get the name of an index

unsigned NdbDictionary::NdbDictionary::Index::getNoOfColumns (  )  const

Get the number of columns in the index

virtual int NdbDictionary::NdbDictionary::Index::getObjectId (  )  const [virtual]

Get object id

Implements NdbDictionary::NdbDictionary::Object.

virtual Object::Status NdbDictionary::NdbDictionary::Index::getObjectStatus (  )  const [virtual]

Get object status

Implements NdbDictionary::NdbDictionary::Object.

virtual int NdbDictionary::NdbDictionary::Index::getObjectVersion (  )  const [virtual]

Get object version

Implements NdbDictionary::NdbDictionary::Object.

const char* NdbDictionary::NdbDictionary::Index::getTable (  )  const

Get the name of the table being indexed

Type NdbDictionary::NdbDictionary::Index::getType (  )  const

Get index type of the index

void NdbDictionary::NdbDictionary::Index::setLogging ( bool  enable  ) 

Enable/Disable index storage on disk

Parameters:
enable If enable is set to true, then logging becomes enabled
See also:
NdbDictionary::Index::getLogging

int NdbDictionary::NdbDictionary::Index::setName ( const char *  name  ) 

Set the name of an index

int NdbDictionary::NdbDictionary::Index::setTable ( const char *  name  ) 

Define the name of the table to be indexed

void NdbDictionary::NdbDictionary::Index::setType ( Type  type  ) 

Set index type of the index


Documentation generated Sun Aug 9 14:27:29 2009 from mysql source files.
© 2003-2004 MySQL AB