Documentation Home
MySQL NDB Cluster API Developer Guide
Download this Manual

2.3.4 The Dictionary Class Dictionary Class Constructor Dictionary::beginSchemaTrans() Dictionary::createDatafile() Dictionary::createEvent() Dictionary::createForeignKey() Dictionary::createHashMap() Dictionary::createIndex() Dictionary::createLogfileGroup() Dictionary::createRecord() Dictionary::createTable() Dictionary::createTablespace() Dictionary::createUndofile() Dictionary::dropDatafile() Dictionary::dropEvent() Dictionary::dropForeignKey() Dictionary::dropIndex() Dictionary::dropLogfileGroup() Dictionary::dropTable() Dictionary::dropTablespace() Dictionary::dropUndofile() Dictionary::endSchemaTrans() Dictionary::getDatafile() Dictionary::getDefaultHashMap() Dictionary::getEvent() Dictionary::getForeignKey() Dictionary::getHashMap() Dictionary::getIndex() Dictionary::getLogfileGroup() Dictionary::getNdbError() Dictionary::getTable() Dictionary::getTablespace() Dictionary::getUndofile() Dictionary::hasSchemaTrans() Dictionary::initDefaultHashMap() Dictionary::invalidateIndex() DIctionary::invalidateTable() Dictionary::listEvents() Dictionary::listIndexes() Dictionary::listObjects() Dictionary::prepareHashMap() Dictionary::releaseRecord() Dictionary::removeCachedTable() Dictionary::removeCachedIndex()


This section describes the Dictionary class.

Parent class.  NdbDictionary

Child classes.  List

Description.  This is used for defining and retrieving data object metadata. It also includes methods for creating and dropping database objects.

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

Table 2.12 Dictionary class methods and descriptions

Name Description
Dictionary() Class constructor method
~Dictionary() Destructor method
beginSchemaTrans() Begins a schema transaction
createDatafile() Creates a datafile
createEvent() Creates an event
createForeignKey() Creates a foreign key
createHashMap() Creates a has map
createIndex() Creates an index
createLogfileGroup() Creates a logfile group
createRecord() Creates an Ndbrecord object
createTable() Creates a table
createTablespace() Creates a tablespace
createUndofile() Creates an undofile
dropDatafile() Drops a datafile
dropEvent() Drops an event
dropForeignKey() Drops a foreign key
dropIndex() Drops an index
dropLogfileGroup() Drops a logfile group
dropTable() Drops a table
dropTablespace() Drops a tablespace
dropUndofile() Drops an undofile
endSchemaTrans() Ends (commits and closes) a schema transaction
getDatafile() Gets the datafile having the given name
getDefaultHashMap() Gets a table's default hash map
getEvent() Gets the event having the given name
getForeignKey() Gets the foreign key having the given name or reference
getHashMap() Gets the hash map given its name or associated table
getIndex() Gets the index having the given name
getLogfileGroup() Gets the logfile group having the given name
getNdbError() Retrieves the latest error
getTable() Gets the table having the given name
getTablespace() Gets the tablespace having the given name
getUndofile() Gets the undofile having the given name
hasSchemaTrans() Tells whether a schema transaction currently exists
initDefaultHashMap() Initializes a atble' default hash map
invalidateTable() Invalidates a table object
listObjects() Fetches a list of the objects in the dictionary
listIndexes() Fetches a list of the indexes defined on a given table
listEvents() Fetches a list of the events defined in the dictionary
prepareHashMap() Creates or retrieves a hash map that can be updated
removeCachedTable() Removes a table from the local cache
removeCachedIndex() Removes an index from the local cache


Database objects such as tables and indexes created using the Dictionary::create*() methods cannot be seen by the MySQL Server. This means that they cannot be accessed by MySQL clients, and that they cannot be replicated. For these reasons, it is often preferable to avoid working with them.


The Dictionary class does not have any methods for working directly with columns. You must use Column class methods for this purpose—see Section 2.3.2, “The Column Class”, for details.

Types.  See Section 2.3.14, “The List Class”, and Section 2.3.5, “The Element Structure”.