NdbDictionary::Index Class Reference

#include <NdbDictionary.hpp>

Inheritance diagram for NdbDictionary::Index:

NdbDictionary::Object

List of all members.


Detailed Description

Represents an index in an NDB Cluster.

Getting Index properties

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


Member Enumeration Documentation

enum NdbDictionary::Index::Type

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::Object.


Constructor & Destructor Documentation

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

Constructor

Parameters:
name Name of index


Member Function Documentation

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

Get the name of an index

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

Get the name of the table being indexed

unsigned NdbDictionary::Index::getNoOfColumns (  )  const

Get the number of columns in the index

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

Get a specific column in the index

Type NdbDictionary::Index::getType (  )  const

Get index type of the index

bool 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.

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

Get object status

Implements NdbDictionary::Object.

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

Get object version

Implements NdbDictionary::Object.

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

Set the name of an index

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

Define the name of the table to be indexed

int 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::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::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).

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

Set index type of the index

void 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


Documentation generated Fri Jul 18 23:10:57 2008 from mysql source files.
© 2003-2004 MySQL AB