2.3.4 The Dictionary Class

2.3.4.1 Dictionary Methods

Abstract

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:

MethodPurpose / Use
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

For detailed descriptions, signatures, and examples of use for each of these methods, see Section 2.3.4.1, “Dictionary Methods”.

Important

Objects created using the Dictionary::create*() methods are not visible from the MySQL Server. For this reason, it is usually preferable to avoid using them.

Note

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.13, “The List Class”, and Section 2.3.5, “The Element Structure”.

Dictionary Class and Subclass Diagram.  This diagram shows all the public members of the Dictionary class and its subclasses:

Public members of the Dictionary class and its subclasses.