NdbDictionary Class Reference

Data dictionary class. More...

#include <NdbDictionary.hpp>

List of all members.

Classes

struct  AutoGrowSpecification
class  Column
 Represents a column in an NDB Cluster table. More...
class  Datafile
class  Dictionary
 Dictionary for defining and retreiving meta data. More...
class  Event
 Represents an Event in NDB Cluster. More...
class  HashMap
 Represents a HashMap in an NDB Cluster. More...
class  Index
 Represents an index in an NDB Cluster. More...
class  LogfileGroup
class  Object
 Meta information about a database object (a table, index, etc). More...
class  ObjectId
class  OptimizeIndexHandle
 Represents a Index Optimization Handle passed as argument to optimizeIndex. More...
class  OptimizeTableHandle
 Represents a Table Optimization Handle Passed as argument to optimizeTable. More...
struct  RecordSpecification
class  Table
 Represents a table in NDB Cluster. More...
class  Tablespace
class  Undofile

Public Types

enum  NdbRecordFlags { RecMysqldShrinkVarchar = 0x1, RecMysqldBitfield = 0x2 }
enum  RecordType { TableAccess, IndexAccess }

Public Member Functions

 NdbDictionary ()

Static Public Member Functions

static RecordType getRecordType (const NdbRecord *record)
static const char * getRecordTableName (const NdbRecord *record)
static const char * getRecordIndexName (const NdbRecord *record)
static bool getFirstAttrId (const NdbRecord *record, Uint32 &firstAttrId)
static bool getNextAttrId (const NdbRecord *record, Uint32 &attrId)
static bool getOffset (const NdbRecord *record, Uint32 attrId, Uint32 &offset)
static bool getNullBitOffset (const NdbRecord *record, Uint32 attrId, Uint32 &nullbit_byte_offset, Uint32 &nullbit_bit_in_byte)
static const char * getValuePtr (const NdbRecord *record, const char *row, Uint32 attrId)
static char * getValuePtr (const NdbRecord *record, char *row, Uint32 attrId)
static bool isNull (const NdbRecord *record, const char *row, Uint32 attrId)
static int setNull (const NdbRecord *record, char *row, Uint32 attrId, bool value)
static Uint32 getRecordRowLength (const NdbRecord *record)
static const unsigned char * getEmptyBitmask ()


Detailed Description

Data dictionary class.

The preferred and supported way to create and drop tables and indexes in ndb is through the MySQL Server (see MySQL reference Manual, section MySQL Cluster).

Tables and indexes that are created directly through the NdbDictionary class can not be viewed from the MySQL Server. Dropping indexes directly via the NdbApi will cause inconsistencies if they were originally created from a MySQL Cluster.

This class supports schema data enquiries such as:

  1. Enquiries about tables (Dictionary::getTable, Table::getNoOfColumns, Table::getPrimaryKey, and Table::getNoOfPrimaryKeys)
  2. Enquiries about indexes (Dictionary::getIndex, Index::getNoOfColumns, and Index::getColumn)

This class supports schema data definition such as:

  1. Creating tables (Dictionary::createTable) and table columns
  2. Dropping tables (Dictionary::dropTable)
  3. Creating secondary indexes (Dictionary::createIndex)
  4. Dropping secondary indexes (Dictionary::dropIndex)

NdbDictionary has several help (inner) classes to support this:

  1. NdbDictionary::Dictionary the dictionary handling dictionary objects
  2. NdbDictionary::Table for creating tables
  3. NdbDictionary::Column for creating table columns
  4. NdbDictionary::Index for creating secondary indexes

See ndbapi_simple_index.cpp for details of usage.


Member Enumeration Documentation

Enumerator:
RecMysqldShrinkVarchar 
RecMysqldBitfield 

Enumerator:
TableAccess 
IndexAccess 


Constructor & Destructor Documentation

NdbDictionary::NdbDictionary (  )  [inline]


Member Function Documentation

static const unsigned char* NdbDictionary::getEmptyBitmask (  )  [static]

static bool NdbDictionary::getFirstAttrId ( const NdbRecord *  record,
Uint32 &  firstAttrId 
) [static]

static bool NdbDictionary::getNextAttrId ( const NdbRecord *  record,
Uint32 &  attrId 
) [static]

static bool NdbDictionary::getNullBitOffset ( const NdbRecord *  record,
Uint32  attrId,
Uint32 &  nullbit_byte_offset,
Uint32 &  nullbit_bit_in_byte 
) [static]

static bool NdbDictionary::getOffset ( const NdbRecord *  record,
Uint32  attrId,
Uint32 &  offset 
) [static]

static const char* NdbDictionary::getRecordIndexName ( const NdbRecord *  record  )  [static]

static Uint32 NdbDictionary::getRecordRowLength ( const NdbRecord *  record  )  [static]

static const char* NdbDictionary::getRecordTableName ( const NdbRecord *  record  )  [static]

static RecordType NdbDictionary::getRecordType ( const NdbRecord *  record  )  [static]

static char* NdbDictionary::getValuePtr ( const NdbRecord *  record,
char *  row,
Uint32  attrId 
) [static]

static const char* NdbDictionary::getValuePtr ( const NdbRecord *  record,
const char *  row,
Uint32  attrId 
) [static]

static bool NdbDictionary::isNull ( const NdbRecord *  record,
const char *  row,
Uint32  attrId 
) [static]

static int NdbDictionary::setNull ( const NdbRecord *  record,
char *  row,
Uint32  attrId,
bool  value 
) [static]


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

MySQL Cluster Database Blog

Based on MySQL Cluster 7.0.10.

This page is for information only and is not maintained by MySQL or Sun Microsystems - use at your own risk. For an upto date view of the API refer to the header files included with your MySQL Cluster distribution or check the MySQL Cluster API Developer Guide.