MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NdbDictionary::Index Class Reference

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

#include <NdbDictionary.hpp>

Inheritance diagram for NdbDictionary::Index:
Collaboration diagram for NdbDictionary::Index:

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

 Index (const char *name="")
virtual ~Index ()
int setName (const char *name)
int setTable (const char *name)
int addColumn (const Column &c)
int addColumnName (const char *name)
int addIndexColumn (const char *name)
int addColumnNames (unsigned noOfNames, const char **names)
int addIndexColumns (int noOfNames, const char **names)
void setType (Type type)
void setLogging (bool enable)
void setStoredIndex (bool x)
bool getStoredIndex () const
bool getTemporary () const
void setTemporary (bool)

Friends

class NdbIndexImpl
class NdbIndexStat

Getting Index properties

enum  Type { Undefined = 0, UniqueHashIndex = 3, OrderedIndex = 6 }
const char * getName () const
const char * getTable () const
unsigned getNoOfColumns () const
int getNoOfIndexColumns () const
const ColumngetColumn (unsigned no) const
const char * getIndexColumn (int no) const
Type getType () const
bool getLogging () const
virtual Object::Status getObjectStatus () const
virtual int getObjectVersion () const
virtual int getObjectId () const
const NdbRecordgetDefaultRecord () const

Additional Inherited Members

- Public Types inherited from NdbDictionary::Object
enum  Status {
  New, Changed, Retrieved, Invalid,
  Altered
}
enum  Type {
  TypeUndefined = 0, SystemTable = 1, UserTable = 2, UniqueHashIndex = 3,
  OrderedIndex = 6, HashIndexTrigger = 7, IndexTrigger = 8, SubscriptionTrigger = 9,
  ReadOnlyConstraint = 10, TableEvent = 11, Tablespace = 20, LogfileGroup = 21,
  Datafile = 22, Undofile = 23, ReorgTrigger = 19, HashMap = 24
}
enum  State {
  StateUndefined = 0, StateOffline = 1, StateBuilding = 2, StateDropping = 3,
  StateOnline = 4, StateBackup = 5, StateBroken = 9
}
enum  Store { StoreUndefined = 0, StoreNotLogged = 1, StorePermanent = 2 }
enum  FragmentType {
  FragUndefined = 0, FragSingle = 1, FragAllSmall = 2, FragAllMedium = 3,
  FragAllLarge = 4, DistrKeyHash = 5, DistrKeyLin = 6, UserDefined = 7,
  HashMapPartition = 9
}

Detailed Description

Represents an index in an NDB Cluster.

Definition at line 1139 of file NdbDictionary.hpp.

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.

Definition at line 1186 of file NdbDictionary.hpp.

Constructor & Destructor Documentation

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

Constructor

Parameters
nameName of index

Definition at line 1052 of file NdbDictionary.cpp.

Here is the call graph for this function:

Member Function Documentation

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

Definition at line 1123 of file NdbDictionary.cpp.

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

Definition at line 1145 of file NdbDictionary.cpp.

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

Definition at line 1157 of file NdbDictionary.cpp.

int NdbDictionary::Index::addIndexColumn ( 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). Deprecated, use addColumnName instead.

Definition at line 1151 of file NdbDictionary.cpp.

int NdbDictionary::Index::addIndexColumns ( int  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). Deprecated, use addColumnNames instead.

Definition at line 1169 of file NdbDictionary.cpp.

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

Get a specific column in the index

Definition at line 1101 of file NdbDictionary.cpp.

const NdbRecord * NdbDictionary::Index::getDefaultRecord ( ) const

Get default NdbRecord object for this index This NdbRecord object becomes invalid at the same time as the index object does - when the ndb_cluster_connection is closed.

Definition at line 1118 of file NdbDictionary.cpp.

const char * NdbDictionary::Index::getIndexColumn ( int  no) const

Get a specific column name in the index Deprecated, use getColumn instead.

Definition at line 1108 of file NdbDictionary.cpp.

Here is the call graph for this function:

bool NdbDictionary::Index::getLogging ( ) const

Check if index is set to be stored on disk

Returns
if true then logging is enabled
Note
Non-logged indexes are rebuilt at system restart.
Ordered index does not currently support logging.

Definition at line 1206 of file NdbDictionary.cpp.

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

Get the name of an index

Reimplemented in NdbIndexImpl.

Definition at line 1076 of file NdbDictionary.cpp.

Here is the caller graph for this function:

unsigned NdbDictionary::Index::getNoOfColumns ( ) const

Get the number of columns in the index

Definition at line 1091 of file NdbDictionary.cpp.

int NdbDictionary::Index::getNoOfIndexColumns ( ) const

Get the number of columns in the index Deprecated, use getNoOfColumns instead.

Definition at line 1096 of file NdbDictionary.cpp.

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

Get object id

Implements NdbDictionary::Object.

Definition at line 1221 of file NdbDictionary.cpp.

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

Get object status

Implements NdbDictionary::Object.

Definition at line 1211 of file NdbDictionary.cpp.

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

Get object version

Implements NdbDictionary::Object.

Definition at line 1216 of file NdbDictionary.cpp.

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

Get the name of the underlying table being indexed

Reimplemented in NdbIndexImpl.

Definition at line 1086 of file NdbDictionary.cpp.

Here is the caller graph for this function:

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

Get index type of the index

Definition at line 1186 of file NdbDictionary.cpp.

Here is the caller graph for this function:

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

Enable/Disable index storage on disk

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

Definition at line 1191 of file NdbDictionary.cpp.

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

Set the name of an index

Reimplemented in NdbIndexImpl.

Definition at line 1071 of file NdbDictionary.cpp.

Here is the caller graph for this function:

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

Define the name of the table to be indexed

Reimplemented in NdbIndexImpl.

Definition at line 1081 of file NdbDictionary.cpp.

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

Set index type of the index

Friends And Related Function Documentation

friend class NdbIndexImpl
friend

Definition at line 1326 of file NdbDictionary.hpp.


The documentation for this class was generated from the following files: